View Single Post
  #3  
Old 29th August 2011, 22:00
fweijers fweijers is offline
Junior Member
 
Join Date: Aug 2009
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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
dstpath=root@192.168.178.100:/shares/internal/BACKUPNAS

ffppath=/ffp

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