Dovecot doveadm mailbox copy during live traffic – missing behavior on concurrent updates
0 reputation · 11 Aug 2023, 15:44 UTC
Goal
We need to migrate a small IMAP application from one Dovecot instance to another with no service interruption. The plan is to use doveadm mailbox copy to replicate the entire mailbox hierarchy while preserving UIDs, flags, and subscriptions.
Constraints
During the copy, the source server continues to receive new messages. The command does not hold a global lock, so concurrent updates may be applied after the copy finishes. The exact timing and handling of these updates are unclear, especially when the source and destination share the same user base.
Unresolved Questions
- When a message arrives in the source mailbox while
doveadm mailbox copyis running, does the destination receive that message immediately after the copy completes, or only after a subsequent incremental run? - Is there a documented flag or option to make the copy operation transactional, ensuring that no messages are lost or duplicated if they arrive during the migration?
- What verification steps are recommended to confirm that the destination mailbox contains all messages, including those received during the copy window, without manual post‑migration synchronization?