"Sami" == Sami Ketola <sami@ketola.io> writes:
On 27. Mar 2022, at 23.09, John Stoffel <john@stoffel.org> wrote:
> "Stephane" == Stephane Magnier <steph.mag220@netcourrier.com> writes:
Sorry, I deleted your most recent email post before I could reply. But why don't you just do 'imapsync' instead from your production dovecot box to some other backup system? Otherwise I'd probably work to setup dovecot's own replication but only have it go one way.
For example, I've got a VPS out in the cloud for my email, and I should probably back it up to my home system using replication, but it would be strictly primary->secondary. I wouldn't be trying to run two primaries replicating between each other.
Imapsync would be an improvement over rsync because it works within dovecot, so you'd get a more consistent view, but maybe not quite as upto date. But how important is your email if you worry about losing 20 minutes worth of it? If it's that critical, then you should be investing in a more robust setup.
Sami> I would not recommend using imapsync to do backups as it loses Sami> data. There is no way for imapsync to retain all data as for Sami> example IMAP protocol does not allow client to set email UID Sami> numbers. Backup made with imapsync is always partial copy of the Sami> original and cannotbe restored identically.
That's true, it's a bit brute force and not ideal. But if you can't setup properly doveadm replication, I would think that imapsync is better than rsync, unless you can pause dovecot/postfix, snapshot the filesystem, unpause dovecot/postfix then rsync the snapshot to your remote backup server.
But I also think that if you're that terrified about losing email, getting dovecot's replication working even just one way would be an improvement.
But the OP doesn't really state his requirements for getting back online. If it's a personal site (like mine) then I can take my time, it's not *that* critical. If it's a customer setup, then why aren't you running replication already, with dovecot director and shared resilient storage behind it?