Hi.
Mostly annoying: I migrated from one machine to another, made sure the target host worked as expected, updated mx records and - after a couple of days - signed it off as good. This is just my private machine, no big deal if something goes wrong..
Everything's fine? Good, let's migrate my inbox from the old machine. There's no direct connectivity between those servers, so what I did was:
(old server) sudo -u vmail dsync -u dar@darklajid.de backup maildir:/tmp/mail_backup/
Works fine, got my maildir. Tar'd it up, moved it to the new server. Now how do I import those mails? Ah, let's use the same command, with -R?
(new server) sudo -u vmail dsync -u dar@darklajid.de -R backup maildir:/tmp/mail_backup Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted.
Wait. What? Sure enough, the last couple of days are gone, the target mailbox is completely empty. I read the man page over and over again, but failed to see the problem. I even thought for a moment that _maybe_ dsync backup is one-way only (even if that failed as well) and tried the same command with mirror. Exactly the same output, same result, empty target mailbox.
In the end I succeeded to import the mails with doveadm import, completely lost a number of days of mails. My fault, sloppy not to back the up again, but I still don't think that this should happen. Ever.
My question now is:
where did I fail (ignoring the backups, please. That's .. something I know)
Can I use dsync ... for backups? I don't think that this is a good idea after yesterday night?
Should dsync EVER try to delete mailboxes? Even 'special' mailboxes? Should it warn about that, asking for a --force switch or something?
Any insights would be appreciated. At this point the damage is done, but I'd like to learn how to do better.
Ben