Sep 03

In ZCS 5.0.9+ you can export an entire mailbox with:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL “//?fmt=tgz” > /tmp/account.tgz

in my case :

root@mail:~# /opt/zimbra/bin/zmmailbox -z -m olivia@test.org getRestURL “//?fmt=tgz” > /tmp/account.tgz

Next transfer via rsync, scp, sftp, etc. You’ll also need to create the account on the 2nd server if the desired account doesn’t exist at your destination server yet.

Then import with:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz&resolve=reset” /tmp/account.tgz

In my case :

root@mail:~# /opt/zimbra/bin/zmmailbox -z -m olivia2@test.org postRestURL “//?fmt=tgz&resolve=reset” /tmp/account.tgz

The resolve= paramater has several options:

* “skip” ignores duplicates of old items, it’s also the default conflict-resolution.
* “modify” changes old items.
* “reset” will delete the old subfolder (or entire mailbox if /).
* “replace” will delete and re-enter them.

‘Reset’ will be a bit faster on an empty destination mailbox because it skips most dupe checks.

Leave a Reply