‘//?fmt=zip&query=is:anywhere’ > user_at_domain.com.zip
“//?fmt=tgz” > /tmp/account.tgz
“//?fmt=tgz&resolve=reset” /tmp/account.tgz
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
echo "*******************************************************" echo "* Zimbra - Backup all email accounts *" echo "*******************************************************" echo"" # echo Start time of the backup = $(date +%T) before="$(date +%s)" # echo "" ZHOME=/opt/zimbra ZBACKUP=$ZHOME/backup/mailbox echo "Generating backup files ..." su - zimbra -c "/opt/backup/SCRIPT_ZIBRA_BACKUP_ALL_ACCOUNTS/zimbra_backup_allaccounts.sh" echo "Sending files to backup all email accounts for Machine2 ..." rsync -avH $ZBACKUP root@ipaddress:/backup/zimbra_backup_accounts before2="$(date +%s)" # echo The process lasted = $(date +%T) # Calculating time after="$(date +%s)" elapsed="$(expr $after - $before)" hours=$(($elapsed / 3600)) elapsed=$(($elapsed - $hours * 3600)) minutes=$(($elapsed / 60)) seconds=$(($elapsed - $minutes * 60)) echo The complete backup lasted : "$hours hours $minutes minutes $seconds seconds"
ZHOME=/opt/zimbra ZBACKUP=$ZHOME/backup/mailbox ZCONFD=$ZHOME/conf DATE=`date +"%a"` ZDUMPDIR=$ZBACKUP/$DATE ZMBOX=/opt/zimbra/bin/zmmailboxif [ ! -d $ZDUMPDIR ]; then mkdir -p $ZDUMPDIRfi echo " Running zmprov ... " for mbox in `zmprov -l gaa` do echo " Generating files from backup $mbox ..." $ZMBOX -z -m $mbox getRestURL "//?fmt=zip" > $ZDUMPDIR/$mbox.zipdone
echo "*******************************************************" echo "* Zimbra - Restore all email accounts *" echo "*******************************************************" echo "" # echo Start Time Restore = $(date +%T) before="$(date +%s)" # echo "" echo "Starting the process restore the backup files ..." su - zimbra -c "/opt/zimbra_backup_accounts/zimbra_restore_allaccounts.sh" before2="$(date +%s)" echo The process lasted = $(date +%T) # Calculating time after="$(date +%s)" elapsed="$(expr $after - $before)" hours=$(($elapsed / 3600)) elapsed=$(($elapsed - $hours * 3600)) minutes=$(($elapsed / 60)) seconds=$(($elapsed - $minutes * 60)) echo "The complete restore lasted : "$hours hours $minutes minutes $seconds seconds" echo "Process completed successfully!"
#!/bin/bash ZHOME=/opt/zimbra#!/bin/bash ZHOME=/opt/zimbra#ZBACKUP=$ZHOME/backup/mailbox ZBACKUP=/opt/zimbra_backup_accounts/mailbox ZCONFD=$ZHOME/conf DATE=`date +"%a"` ZDUMPDIR=$ZBACKUP/$DATE ZMBOX=/opt/zimbra/bin/zmmailboxif [ ! -d $ZDUMPDIR ]; then echo "Backups do not exist !" exit 255; fi for mbox in `zmprov -l gaa` do echo " Restoring files from backup $mbox ..." $ZMBOX -z -m $mbox postRestURL "//?fmt=zip&resolve=reset" $ZDUMPDIR/$mbox.zipdone
#!/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; fifor 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