Backup home directory shared server
rsync --exclude=BKHOME --password-file=/backup_script/pass -avz -u --bwlimit=5000 root@192.227.84.98::home/a[d-f]* /backup_script/INDIA/192.227.84.98/DAILY/home > /backup_script/INDIA/192.227.84.98/logs/home-ad-af.log 2>&1
rsync --exclude=BKHOME --password-file=/backup_script/pass -avz -u --bwlimit=5000 root@192.227.84.98::home/[b-c]* /backup_script/INDIA/192.227.84.98/DAILY/home > /backup_script/INDIA/192.227.84.98/logs/home-b-c.log 2>&1
root@192.227.84.98::home/[m-o]*
rsync --exclude=BKHOME --password-file=/backup_script/pass -avz -u --bwlimit=5000 root@192.227.84.98::home/s[b-d]* /backup_script/INDIA/192.227.84.98/DAILY/home > /backup_script/INDIA/192.227.84.98/logs/home-sb-sd.log 2>&1
root@192.227.84.98::home/s[j-t]*
#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date +%H-%M`
rsync --password-file=/backup/pass -avz -u --bwlimit=5000 root@192.168.2.43::var/log/ /backup/INDIA/directadmin43/DAILY/var/log/ > /backup/INDIA/directadmin43/logs/varlog.log 2>&1
T2=`date +%H-%M`
echo "START : " $T1 >> /backup/INDIA/directadmin43/logs/varlog.log
echo "END : " $T2 >> /backup/INDIA/directadmin43/logs/varlog.log
############## Mail Alerts ##################
grep "rsync error" /backup/INDIA/directadmin43/logs/varlog.log
i=`echo $?`
if [ $i -eq 0 ]
then
echo "
Dear All,
Please note that backup of the script "/backup/INDIA/directadmin43/rsy-varlog" is not proper.
Thanx " > /tmp/directadmin43
cat /tmp/directadmin43 | mail -s "JBOSS Improper-Backup alert" backup@privatebrandhost.com
else
echo "
Dear All,
Please note that backup of the script "/backup/INDIA/directadmin43/rsy-varlog" is proper.
Thanx " > /tmp/directadmin43
cat /tmp/directadmin43 | mail -s "JBOSS Proper-Backup alert" backup@privatebrandhost.com
fi
rsync --exclude=BKHOME --password-file=/backup_script/pass -avz -u --bwlimit=5000 root@192.227.84.98::home/[b-c]* /backup_script/INDIA/192.227.84.98/DAILY/home > /backup_script/INDIA/192.227.84.98/logs/home-b-c.log 2>&1
root@192.227.84.98::home/[m-o]*
rsync --exclude=BKHOME --password-file=/backup_script/pass -avz -u --bwlimit=5000 root@192.227.84.98::home/s[b-d]* /backup_script/INDIA/192.227.84.98/DAILY/home > /backup_script/INDIA/192.227.84.98/logs/home-sb-sd.log 2>&1
root@192.227.84.98::home/s[j-t]*
#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date +%H-%M`
rsync --password-file=/backup/pass -avz -u --bwlimit=5000 root@192.168.2.43::var/log/ /backup/INDIA/directadmin43/DAILY/var/log/ > /backup/INDIA/directadmin43/logs/varlog.log 2>&1
T2=`date +%H-%M`
echo "START : " $T1 >> /backup/INDIA/directadmin43/logs/varlog.log
echo "END : " $T2 >> /backup/INDIA/directadmin43/logs/varlog.log
############## Mail Alerts ##################
grep "rsync error" /backup/INDIA/directadmin43/logs/varlog.log
i=`echo $?`
if [ $i -eq 0 ]
then
echo "
Dear All,
Please note that backup of the script "/backup/INDIA/directadmin43/rsy-varlog" is not proper.
Thanx " > /tmp/directadmin43
cat /tmp/directadmin43 | mail -s "JBOSS Improper-Backup alert" backup@privatebrandhost.com
else
echo "
Dear All,
Please note that backup of the script "/backup/INDIA/directadmin43/rsy-varlog" is proper.
Thanx " > /tmp/directadmin43
cat /tmp/directadmin43 | mail -s "JBOSS Proper-Backup alert" backup@privatebrandhost.com
fi
Comments
Post a Comment