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

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

9 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


Nice Blog ! Thanks for such a informative post

Relay

I really enjoyed reading your blog. I really appreciate your information which you shared with us. If anyone who want to create his/her carrier in Linux. Get a free demo call on 9311002620 or visit https://htsindia.com/Courses/modular-courses/linux-training-institute

Relay

Thanks for posting these kinds of post its very helpful and very good content a really appreciable post apart from that if anyone looking for C++ training institute in delhi so contact here +91-9311002620 visit https://www.htsindia.com/Courses/modular-courses/c-plus-plus-training-course

Relay

Very nice post thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for AutoCAD institute in delhi so check out this Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/AutoCAD-training-courses

Relay

HTS provides you the best advanced excel training in Delhi. We surely have so much for you to make you best in data analysis.We have highly skillful trainers for Advance Excel courses. The Module of High Technologies Solutions is so simple and compressive that includes complete knowledge of Excel beginning to Advance.contact here +91-9311002620
visit https://www.htsindia.com/Courses/business-analytics/adv-excel-training-course

Relay

Great post, your all points fully clarified all topics by this post. These steps are helpful for online accounting services. Thank you for providing such valuable information.Direct Mail Service Companies

Relay

Very nice post thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for Advance Excel institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/business-analytics/adv-excel-training-course

Relay

Thank you for sharing this post its very knowledgeable i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for Advance Excel institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/business-analytics/adv-excel-training-course

Relay