How to export import emails for a specific date: Difference between revisions

(Created page with "{{BC|Certified}} __FORCETOC__ <div class="col-md-12 ibox-content"> =How to export/import emails for a specific date?= <hr> {{KB|{{WIP}}|{{ZCS 9.0}}|{{ZCS 8.8}}|}} <hr> ====P...")
(No difference)

Revision as of 06:11, 21 December 2022

How to export/import emails for a specific date?


   KB 24494        Last updated on 2022-12-21  




0.00
(0 votes)

Problem

How to export/import emails for a specific date from CLI?

Steps

1)Run following command to export emails.

 $ zmmailbox -z -m alice@example.com gru "//?fmt=tgz&query=after:"7/20/2022"&before:"7/26/2022"" >> /tmp/alice.tgz    

It will create a .tgz file into /tmp directory.

2) Create folder, where you want to import emails:

$ zmmailbox -z -m bob@example.com cf /Exported_data

3) Copy the .tgz file into the mailbox server where you want to import. Make sure file permission and ownership should be:

-rw-r----- 1 zimbra zimbra  12K Jul 26 05:13 alice.tgz

4) Try to import emails. Run on new server or any other server where you want to import emails:

$ zmmailbox -z -m bob@example.com postRestURL "/Exported_data?fmt=tgz&resolve=replace"  /tmp/alice.tgz

Note: Zimbra doesn't support export-import of large mailbox in tgz because of broken .tgz file and other IO error.

Jump to: navigation, search