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)
1. First sync: doveadm sync -f
2. Second sync: doveadm sync -s “" > state
3. Subsequent infrequent syncs: doveadm sync -f
4. 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/47349e24828be3ec7f591570e02c0b15ae26c649/src/replication/replicator/dsync-client.c#L233
 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
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to