[Dovecot] dsync deleted my mailbox - what did I do wrong?

Benjamin Podszun dar at darklajid.de
Mon Apr 7 09:11:11 UTC 2014


Hey Jiri.

Thanks for getting back.

On Friday, April 4, 2014 4:48:48 PM CEST, Jiri Bourek wrote:
>> - where did I fail (ignoring the backups, please. That's .. something I
>> know)
>
>  From the man page: "backup - Backup mails from default mail 
> location to location2 (or vice versa, if -R parameter is given). 
> No changes are ever done to the source location. Any changes 
> done in destination are discarded."

Yeah, maybe. That's what I thought _after_ the fact (i.e. that was what I 
hinted at with 'one way sync'). But see below.

> The last sentence describes what happened to you: all new mail 
> on the new machine is a "change" and was discarded (by deleting 
> new mail.) If I'm not mistaken, this is correct behaviour for 
> backup mode - you get exact copy of the source side 
> (maildir:/tmp/mail_backup) on destination side 
> (dar at darklajid.de)

That would be sort of okay. Except that isn't what happened:

- The target mailbox was killed completely
- Nothing was restored

If what you're suggesting here is true I'd expect a clean copy of my source 
- even if it destroys all other changes. That did NOT happen though. It 
nuked the target and didn't restore a thing.

Plus, dsync mirror did exactly the same: Nuked the (live) mailbox once 
more, same error message, not a single message restored (but also no 
modification to the source).

>> 
>> - Can I use dsync ... for backups? I don't think that this is a good
>> idea after yesterday night?
>
> AFAIK you can safely use it to make the backup. I'm not sure if 
> it can be reliably used to restore data (don't think so but I'm 
> not an expert.) I'd use doveadm import for that.

That'd be my experience at this point as well, of course. :-)
The bigger question is if this is well-known / correct and if this should 
be documented in a better fashion. Was I really that naive to expect that 
to work (in that case: ignore the documentation request) or could that 
happen again?

Ben


More information about the dovecot mailing list