Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

My blog about Open Source: Zimbra Mail Server,linux,bash script,centos,linux command...

How to backup and restore for zimbra mailbox

In this tutorial, How to "Backup and restore for zimbra mailbox". How to backup mailbox for accounts? How to restore mailbox for accounts?
How to backup and restore for zimbra mailbox





The format list_account file as below:
[email protected]
[email protected]
The script backup mailbox for all accounts
#!/bin/bash
FILE=/tmp/list_account
DATE=$(date +"%a")
ZMBOX=/opt/zimbra/bin/zmmailbox
while read account
do
     echo "---Generating files from backup $account ---"

     $ZMBOX -z -m $account -t 0 getRestURL "//?fmt=zip" > /tmp/$acount.$DATE.zip

done < $FILE
The script restore mailbox for all accounts
#!/bin/bash
FILE=/tmp/list_account
DATE=$(date +"%a")
ZMBOX=/opt/zimbra/bin/zmmailbox
while read account
do
    echo "---Restoring files from backup $account---"
    $ZMBOX -z -m $account -t 0 postRestURL "//?fmt=zip&resolve=reset" /tmp/$account.$DATE.zip
done < $FILE
Note: if you setup multi-server Zimbra with multi-domain, How to backup and restore without split DNS? :)

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com

1 Comments :

What if the most desired document or letter is lost or theft along with the letterbox? The result might be catastrophic sometime! So, it should be the foremost duty to ensure the safety of your documents outside the door. A secure and heavy duty locking mailbox can do this. We were in search of the best secure mailbox

Relay

This Blog is protected by DMCA.com