View Single Post
Old 29th August 2011, 23:00
fweijers fweijers is offline
Junior Member
Join Date: Aug 2009
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts

Not sure I use full paths ...

The funny thing is that the script runs fine when started from command line, but not when started via Crontab.

This is the backupscript:
# Set Source Path
# Back up the A drive (HD_a2) by identifying the source path as /mnt/HD_a2
# Back up multiple directories by surrounding a list with single quotes (i.e., s
# srcpath='/mnt/HD_a2/VIDEO /mnt/HD_a2/DOCUMENTEN /mnt/HD_a2/FOTOS /mnt/HD_a2/CO
srcpath='/mnt/HD_a2/DOCUMENTEN /mnt/HD_a2/VIDEO /mnt/HD_a2/FOTOS'

# Set the Destination Path


datum=`date "+%Y%m%d_%H%M%S"`
echo $datum >> $ffppath/log/snapshotMYBOOKWORLD.log 2>&1

$ffppath/bin/rsync -av $srcpath $dstpath >> $ffppath/log/snapshotMYBOOKWORLD.log

datum=`date "+%Y%m%d_%H%M%S"`
echo $datum >> $ffppath/log/snapshotMYBOOKWORLD.log 2>&1
Reply With Quote