G'day, Explanation....
Got a cron job which runs @ 7pm every week night to backup folders in /home/shares (smb shares). When run manually (/etc/cdbackup) everything works fine, and the CD burns with the right datestamps on the tar files. The cron job does run, cause theres an eject /cdrom line at the end of the script, and the CD does eject itself. However when left to its own devices it doesn't appear that nothing gets written to the CD, even tho the output off the screen is the same as when executed manually. Related files for reference are below TIA. --- start /etc/cdbackup dump --- #!/bin/bash DOCOMPRESS=YES DOIMAGE=YES DOBURN=YES clear echo -e "================ COMMENCING DAILY BACKUP =================\n\n" cd /home/shares rm -f *.cd rm -f *.tar touch `date +%a-%d%m`.cd if [ $DOCOMPRESS = "YES" ] then echo -e "Compressing ...." echo -e " Store1 Data" tar czf store1.tar store1/ echo -e ".... Finished\n" fi if [ $DOIMAGE = "YES" ] then echo -e "Deleting previous nights CD Image File...." rm -f cdimage.raw echo -e "Creating CD Image File...." mkisofs -R -o cdimage.raw *.tar fi if [ $DOBURN = "YES" ] then echo -e "Writing CD...." cdrecord -v -eject speed=4 blank=fast dev=0,0,0 cdimage.raw wait umount /cdrom eject /cdrom fi echo -e ".... Finished\n" echo -e "Backup Completed" > backup.log date >> backup.log echo -e "=================\n\n" cd - --- end /etc/cdbackup dump --- --- start /var/spool/cron/crontabs/root --- # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.XXXX81mSF5 installed on Wed Jul 9 14:36:22 2003) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 0 19 * * 1-5 /etc/cdbackup --- end /var/spool/cron/crontabs/root --- -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
