How to Backup and Restore Email in Zimbra

Share this Article :

This post will describes the quick steps how you can perform backup and restore in zimbra email server. Assumed that the domain ehowstuff.local have one user with the email id user@ehowstuff.local. Email administrator was requested to perform backup and restore without login to user, meaning the backup and restore task should be perform via command line using zmmailbox command. Kindly refer to below steps :

1. Make sure you have root access to zimbra email system and the backup destination should be writable by zimbra user. Create /backup and assign permission to zimbra user and group :

[root@mail-server ~]# mkdir /backup
[root@mail-server ~]# chown -R zimbra:zimbra /backup

2. As a zimbra user, issue the following command to backup the user mailbox :

[root@mail-server~]# su - zimbra
[zimbra@mail-server ~]$ zmmailbox -z -m user1@ehowstuff.local getRestURL "//?fmt=tgz" > /backup/user1@ehowstuff.local.tar.gz

3. As a zimbra user, issue the following command to restore the user mailbox :

[root@mail-server~]# su - zimbra
[zimbra@mail-server ~]$ zmmailbox -z -m user1@ehowstuff.local postRestURL "//?fmt=tgz" > /backup/user1@ehowstuff.local.tar.gz

Note : Please note that this will backup mailbox content only without user preferences.


One Response

  1. govinda

Leave a Reply