On 9/4/19 2:12 PM, Peter Mogensen wrote:
So... I've done some testing.
One method which seemed to work - at least for primitive cases - was to:
- Mount the ALT storage on the destination.
- Run "doveadm force-resync \*" on the destination. (putting all the mails in ALT storage into the dovecot.map.index)
- Run dsync from source to destination.
Of course... if there was some way to avoid step 2...
So ... I have an idea.
Assuming users mail_location is:
mdbox:~/mdbox:ALT=/alt:INDEX=~/idx
And /alt is a shard mounted storage.
Then, it suspect the following steps would make dsync avoid transfering mails on shared storage:
Create a rudimentary mdbox on the target side (just containing the dbox-alt-root link)
Mount /alt on the target host
Copy all dovecot.index and dovecot.map.index in ~/idx from source to target. That is: not the transaction (*.log) files or cache files. I suppose this needs to be done under appropriate read locking.
doveadm sync -u source doveadm dsync-server -u target ... to get the rest of the mails in primary storage and all updates sine the index files where snapshot.
It would be nice if there was a way to force dovecot*index.log files to be snapshot to index files.
If the aim is not to sync two different accounts but to simply move one account from one host to a new host where it doesn't exist in advance, are there any caveats with this?
... apart from a few missing tools.
/Peter