The one of weakness on zimbra FOSS edition is there’s no backup feature. Backup feature is only available for Zimbra Network Edition.
I’ve made a bash script to do a zimbra live backup for FOSS Edition. This script has been made based on this reference and this one
There are no rsync and ssh in this script, but I think we can modifying and merging this script with other scripts from the wiki page.
The goal is to do a remotely synchronization using rsync, ssh and “live” backup for zimbra open source edition.
#!/bin/bash
### START CONFIGURATION ###
DIR="/tmp/zimbra";
OUTPUT="/tmp/zimbra";
### END OF CONFIGURATION ###
USERS=`su - zimbra -c 'zmprov gaa'`;
DATE=`date +%Y%m%d`;
if [ ! -d $DIR ]; then mkdir $DIR; chown zimbra:zimbra $DIR; fi
for ACCOUNT in $USERS; do
NAME=`echo $ACCOUNT | awk -F@ '{print $1}'`;
su - zimbra -c "zmmailbox -z -m $ACCOUNT getRestURL '//?fmt=tgz' > $DIR/$NAME.tgz";
done
cd $DIR; mkdir $DATE; mv *.tgz $DATE
tar cjpf $OUTPUT/$DATE.tar.bz2 $DATE;
cd $DIR; rm -rf $DATE
or you can download the script here
What is this backing up? I only see it backing up the user names.. Am I missing the mail being backed up?
This script back up mailbox each user
Hi.
The script exports information to .tar.gz file or something like this right?, and my ask is …. after it, how I can restore each backup?
Thanks.
Mario: you can restore the backup files using restore function. you can find this function after login to your mailbox. Please check at setting/options configuration.
mas dudy mau tanya, saya coba implementasi script diatas untuk zimbra saya Release 5.0.5_GA_2201.RHEL5_20080417012110 CentOS5 FOSS edition klo dipanggil menggunakan root muncul error ERROR: service.FAILURE (system failure: GET failed, status=501 not implemented yet)
dan klo dipanggil menggunakan user zimbra errornya Password:
su: incorrect password
Compressing mailbox backup, please wait…
mv: cannot stat `*.tgz’: No such file or directory
Zimbra mailbox backup has been completed successfully.
adakah masukannya mas..?
terimakasih