Am 25.02.2013 11:41, schrieb Angel L. Mateo: > Hello, > > Last days we had to restore some mailboxes from backup. Our > mailboxes are in maildir format and during restore, some duplicated > files appeared. The situation is: > > * A user has messages in his new directory when the backup is made > * In some moment after the backup is done, the user accesses to his > mailbox, so the message is move to the cur directory. > * We restore his mailbox directly to his maildir path, so the message is > now at new directory too. > > When this happens, dovecot detect it and it renames one of the > files. This is the reported log: > > Feb 13 23:08:05 myotis31 dovecot: imap(<user>): Warning: Fixed a > duplicate: > /home/alumnos/59/122559/Maildir/cur/1360169810.M670208P13643.myotis31,S=6282,W=6409:2, > -> 1360793285.M721935P29136.myotis31 > > The problem with this is that we are using zlib plugin so messages > are compressed. When the rename is done, the rename is to a name without > the S=XXXX field (neither the W=XXX, although this field is less > sensible), so the result is that user's can't access to any message > after this one. > > I think than in this situation, rename one of the files is a good > solution (although it provokes duplicate mails, but this an > expected/acceptable situation after the restore), but the rename should > maintain the S= and W= fields (and even other maildir flags). >
how you do the backup, dsync , rsync ??? perhaps you can avoid problems restore mail to another new named mailbox like restore.orig.name@somedomain.example, then the user himself or supporter, may copy restored mails himself to the orig mailbox or might be better in some subfolder i.e restore of the orig mailbox Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich