On 8/2/2011 5:52 μμ, Jeff wrote: Thanks Jeff for your answerNikos Gatsis - Qbit <ngatsis <at> qbit.gr> writes:Hello list I use rsync to backup cyrus mail dirs using the following command: rsync -vaR --delete --log-file=/var/log/rsync /var/lib/imap /var/spool/imap/ /mnt/backup The destination is a Lacie external network drive in ntfs format. The problem I have is that rsync change email names from, lets say 102. to 2RB3UX~6. I also backup to a local ext3 format hard drive where files save with exactly same name with right attributes, and rights with no problem. I try to rsync to a window pc shared folder and the emails saved also with the same names as used (102. to 102.) The external disk cant change from ntfs to ext format. Does someone had the same problem? Thank you in advance.I have not seen your exact problem with the files being renamed, but I do know that Windows/NTFS makes life very difficult for cyrus mail files. While NTFS allows file names that end with a dot, virtually all of the Windows OS tools for accessing files do not work with such file names. It's hard to say what is happening on the Lacie drive. Could the Lacie NAS drive be running a linux implementation of NTFS behind the scenes? That would be another potential source of problems. One solution would be to rsync /var/spool/imap to a local directory on the imap server and then tar it up to /mnt/backup. We store our mail backups on a Windows server using the Microsoft implementation of NFS (regrettable, I know). We didn't have any issues getting the imap email files to the NFS share, but again, we couldn't work with them from the Windows OS. We solved the problem with a rather convoluted script that first mirrors the directory structure of /var/spool/imap, then in the mirror directory, it softlinks to every file in /var/spool/imap, but adds a "eml" extension to the all links that refer to mail files that end with a dot. Then we rsync the mirror structure to NFS using the --copy-links option which copies the content of the symlink referrent, thus generating the same file on the Windows server, but with a .eml extension, which then can be easily managed with Windows tools. Oh, the hoops we jump through to deal with Windows... I once emailed the cyrus-devel list asking about possibly changing the file-name convention of mail files and received an unofficial patch that seemed to work just fine. http://lists.andrew.cmu.edu/pipermail/cyrus-devel/2009-November/001317.html Jeff ---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ It's strange that some of my clients have nas in ntfs format (mostly lacie) and work without this problem and some others (different models of nas) has it. More strange is that on of them, a seagate blackarmor something has cifs shares... I have already try your workaround to backup in a windows server and work with no problem. Thank you again --
Γατσής Νίκος - Gatsis Nikos Web developer tel.: 2108256721 - 2108256722 fax: 2108256712 email: ngatsis@xxxxxxx http://www.qbit.gr |
---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/