[email protected]The script backup mailbox for all accounts
[email protected]
#!/bin/bashThe script restore mailbox for all accounts
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
#!/bin/bashNote: if you setup multi-server Zimbra with multi-domain, How to backup and restore without split DNS? :)
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
Thanks for reading How to backup and restore for zimbra mailbox My blog Effortless Zimbra Mail Management: Unleashing the Power of Linux Commands, How-To, and Bash Scripts I hope this is useful.