I have a script to take daily backups for cpanel users the scripts is like :
If I run this script manually then it generates the backup and moves to destination properly but when I use cronjob to do so it wont work#!/bin/bash
Time=`date "+%Y.%m.%d-%A"`
bakdst=/home/DailyBackup
mkdir -p $bakdst/$Time
for U in `cat lst`;
do
/scripts/pkgacct $U;
mv cpmove-$U.tar.gz > /home/DailyBackup;
done
echo " ................. Successfully Done ............................"
exit 0I have set the cron as :
0 4 * * * /bin/bash /home/backup.sh
As well cron logs aren;t hleping as :
Mar 16 10:30:01 server1 crond[8246]: (root) CMD (/bin/bash /home/bacup.sh)
Any guideline on this is appreciated.



LinkBack URL
About LinkBacks
I have set the cron as :
Reply With Quote





