<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-7"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <br>
    <br>
    On 8/2/2011 5:52 μμ, Jeff wrote:
    <blockquote cite="mid:loom.20110208T163535-808@post.gmane.org"
      type="cite">
      <pre wrap="">Nikos Gatsis - Qbit &lt;ngatsis &lt;at&gt; qbit.gr&gt; writes:
</pre>
      <blockquote type="cite">
        <pre wrap="">    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.
</pre>
      </blockquote>
      <pre wrap="">
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. 

<a class="moz-txt-link-freetext" href="http://lists.andrew.cmu.edu/pipermail/cyrus-devel/2009-November/001317.html">http://lists.andrew.cmu.edu/pipermail/cyrus-devel/2009-November/001317.html</a>

Jeff

----
Cyrus Home Page: <a class="moz-txt-link-freetext" href="http://www.cyrusimap.org/">http://www.cyrusimap.org/</a>
List Archives/Info: <a class="moz-txt-link-freetext" href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a>

</pre>
    </blockquote>
    Thanks Jeff for your answer<br>
    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.<br>
    More strange is that on of them, a seagate blackarmor something has
    cifs shares...<br>
    I have already try your workaround to backup in a windows server and
    work with no problem.<br>
    <br>
    Thank you again<br>
    <br>
    <div class="moz-signature">-- <br>
      <title>Untitled Document</title>
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-7">
      <hr align="left" noshade="noshade" size="1" width="90%">
      <font size="2" face="Georgia, Times New Roman, Times, serif"><b>Γατσής
          Νίκος - Gatsis Nikos</b><br>
        Web developer<br>
        tel.: 2108256721 - 2108256722<br>
        fax: 2108256712<br>
        email: <a class="moz-txt-link-abbreviated" href="mailto:ngatsis@qbit.gr">ngatsis@qbit.gr</a><br>
        <a class="moz-txt-link-freetext" href="http://www.qbit.gr">http://www.qbit.gr</a></font> </div>
  </body>
</html>