zimbra backups
###daily###
00 21 * * 1,2,3,4,5,6 /bin/bash /home/sas/daily.sh
###weekly###
00 21 * * 7 /bin/bash /home/sas/weekly.sh
[root@mail ~]# cat /home/sas/daily.sh
#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date`
rsync -avz --update /opt/zimbra/ /secondary/opt/zimbra/ > /home/sas/script/logs/opt.daily.log 2>&1
T2=`date`
echo "START : " $T1 >> /home/sas/script/logs/opt.daily.log
echo "END : " $T2 >> /home/sas/script/logs/opt.daily.log
[root@mail ~]# cat /home/sas/weekly.sh
#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date`
rsync -avz --delete /opt/zimbra/ /secondary/opt/zimbra/ > /home/sas/script/logs/opt.weekly.log 2>&1
T2=`date`
echo "START : " $T1 >> /home/sas/script/logs/opt.weekly.log
echo "END : " $T2 >> /home/sas/script/logs/opt.weekly.log
Comments
Post a Comment