weekly tz backup zimbra
0 1 * * 6 /bin/sh /home/sas/script/weekly-tz-script/weekly-tz.sh
0 22 * * 5 rm -rf /Offlinebackup/tz-data/tz-data-weekly-backup/*.tgz
#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date`
/opt/zimbra/bin/zmprov -l gaa > /home/sas/script/weekly-tz-script/emails.txt
for email in `cat /home/sas/script/weekly-tz-script/emails.txt`; do /opt/zimbra/bin/zmmailbox -z -m $email getRestURL '/?fmt=tgz' > /Offlinebackup/tz-data/tz-data-weekly-backup/$email.tgz ; echo $email ; done > /home/sas/script/logs/opt.weeklytz.log 2>&1
T2=`date`
echo "START : " $T1 >> /home/sas/script/logs/opt.weeklytz.log
echo "END : " $T2 >> /home/sas/script/logs/opt.weeklytz.log
Comments
Post a Comment