Guidance re doveadm sync full (-f) and stateful (-s)
Hi,
I’m looking for guidance on how to use doveadm sync with flags -f (full synchronization) and -s. (stateful synchronization)
After reading the doveadm-sync man page it seems one should do the following: (omitting -u -l -N flags for clarity)
- First sync: doveadm sync -f
- Second sync: doveadm sync -s “" > state
- Subsequent infrequent syncs: doveadm sync -f
- Subsequent frequent syncs: doveadm sync -s “$(<state)” > state
(I’m assuming that before the first sync replica A has all the mailboxes and replica B has no mailboxes. I’m also assuming that the above commands are executed from replica A. The goal is to do master/master sync continuously.)
Can you help me answer the following questions? a. Each time we execute (4) stateful sync after (3) full sync, is it correct to include previous state? b. What happens if we do: doveadm sync -f -s “” or doveadm sync -f -s “$(<state)”
I think the replicator code does (b) in https://github.com/dovecot/core/blob/47349e24828be3ec7f591570e02c0b15ae26c64... and I’m not sure why.
Overall, it would be good to have more examples in the man page demonstrating the various synchronization modes.
Thanks,
Georgios
participants (1)
-
Georgios Kontaxis