DVD Burning Problem

Benjamin J. Weiss benjamin at Weiss.name
Tue Aug 3 11:39:35 UTC 2004


On Mon, 2 Aug 2004, Oliver Ignacio wrote:

> Hey Ben,
>  Thanks for the reply. The DVD Drive is DVD +/- RW, but the media that
> I'm using is a DVD+RW. I'd try using mondo, but I don't know enough
> about linux to even know how to make the script for for that. The script
> was written by a co-worker of mine, but has left to company for a
> different job, so now I'm here trying to figure out how all of this
> works. 

Okay, mondo is great!  I believe that I installed it from Dag's yum 
repository, but I can't remember for sure.  If nothing else, the 
instructions on http://www.mondorescue.org were easy to follow, as I 
recall.

I'm backing up to DVD+RW media, as I mentioned before.  I run into a snag 
about every two weeks due to dvdrecord issues, but for the most part it's 
stable.  I'm posting my script below.  Please be gentle, it's the result 
of a lot of trial and error... :)

-------------------------
#!/bin/bash

# bash shell script to do a full backup to DVD+RW
# 2 June 2004 - Benjamin J. Weiss
#
# This script does a full backup of non-temporary filesystems
#
# Options used for the mondoarchive command below:
#       -O              : Do a backup, not a verify.
#        F              : Don't write to a Floppy disk
#        r              : Use a DVD
#       -s 4400m        : Keep it to 4.4 gig, for safety sake
#       -d /dev/scd0    : Use the DVD burner
#       -l GRUB         : The bootloader that we're using
#       -f /dev/sda     : The drive that the boot loader is on
#       -E "path"       : Directories to exclude from the backup.

# modified path so that mondoarchive can find mindi, etc
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

RESULT=failure
DATE=`date`
EMAIL=benjamin at weiss.name

# sometimes mondo gets hung up if the tape wasn't
# ready when it executed, so we kill any
# existing processes
while ps -axc | grep mondoarchive;
do
        pkill mondoarchive && echo killed mondoarchive process
done

#for now, the only way to blank the dvd is to format it
/usr/local/bin/dvd+rw-format -force /dev/scd0

# now to the backup
/usr/sbin/mondoarchive -OFr -s 4400m -d /dev/scd0  -l GRUB -f /dev/sda \
   -E "/tmp /dev /mnt /proc" && RESULT=success

TEXT="orion backup for $DATE status: $RESULT"
echo $TEXT > /tmp/orion-backup

mutt -s "$TEXT" $EMAIL < /tmp/orion-backup

#bring the DVD tray back in
mount /mnt/cdrom

#unmount the dvd so that it can be swapped
umount /mnt/cdrom

#rm -f /tmp/orion-backup

# set path back to what cron expects
PATH=/sbin:/bin:/usr/sbin:/usr/bin

--------------------

HTH,

Ben





More information about the redhat-list mailing list