On  6 Nov, Leslie Katz wrote:
>  Matthew Hannigan wrote:
> > On Sun, Nov 05, 2006 at 06:32:28PM +1100, Leslie Katz wrote:
> >   
>  >> I made five .isos, each the size of one cd. I tried 
>  >> to create a single .iso out of the five by using cat, as I'd seen 
>  >>     
>  >
> > I dunno how that'd work, but I guess it's possible!
>  >
> >   
>  >> suggested somewhere, but couldn't boot with a dvd burnt from it. 
>  >>
>  >>     
>  Hi Matt.
>  
>  Where I read the suggestion (unless, of course, I misinterpreted it!)
>  was at:
>  
>  http://www.sun.com/software/solaris/download_instruction.xml
>  
>  Whether the suggestion was wrong, I can't say, but I can say I had no
>  success with it.
>  
>  I've now done the backup again, using the correct settings to create one
>  .iso only.

I use shell scripts to do it.  They keep track of time since last backup
of a lower level, and copy all the files to a tmp directory (TMPIMGDIR,
below), then erase the old dvd and write the new one, then note the
backup level and date if it all succeeded.

It's actually a lot more complex than that, since I prune away files of
no interest, and make sure the files are split into lists to allow
multi-dvd backups if the files get too big for one, and work for
floppies, zip drives, cdrws, tapes, dvdrws, and keep plain text lists
of every pathname backed up.

The guts of the actual writing are like this (on my old RH system),
below.  Note that $device is set to your dvdrw device e.g. /dev/dvd,
$device_mount is set to the mount point, e.g. /mnt, and I set
$device_file to $TMPIMDIR/slash to remind me it's meant to represent
the root of the filesystems.

Key script pieces follow:

if [ "x$device" = "x" -o "x$device_mount" = "x" -o "x$device_file" = "x" ]
then
    echo "You must have device and device_mount env variables defined!"
    exit 1
fi  
set +e  
    if mount $device $device_mount
    then
        ls -la $device_mount
        umount $device_mount
        echo "Cleaning $device_mount..."; sleep 10
        dvd+rw-format -force $device
    else    
        echo "   *** assuming $device has never been written on before ***" >&2
    fi      
    if [ ! -d $TMPIMGDIR ]
    then
        mkdir $TMPIMGDIR || exit 1
    fi 
    mkdir $device_file || exit 1 
set -e




if [ "x$device" = "x" -o "x$device_mount" = "x" -o "x$device_file" = "x" ]
then
    echo "You must have device and device_mount env variables defined!"
    exit 1
fi  
set +e  
    if mount $device $device_mount
    then
        ls -la $device_mount
        umount $device_mount
        echo "Cleaning $device_mount..."; sleep 10
        dvd+rw-format -force $device
    else    
        echo "   *** assuming $device has never been written on before ***" >&2
    fi      
    if [ ! -d $TMPIMGDIR ]
    then
        mkdir $TMPIMGDIR || exit 1
    fi 
    mkdir $device_file || exit 1 
set -e
(
    HERE=`pwd`
    [ -z "$TMPIMGDIR" ] && echo "avoiding catastrophic error" >&2 && exit 1
    cd $TMPIMGDIR || exit 1
        #
        # Mark the media with an empty file with the name of its backup level:
        #
        > $1
        
        pushd $device_file
            echo "Now cd-ing one directory above $device_file"
            cd ..
            ls -l
            growisofs -Z $device -quiet -J -udf -T -R -V "$1" -r .  || exit 1
        popd
        rm -rf $device_file
        rm *    # Any old $1-like files, plus the cpio-bkp file.
    cd "$HERE"
    rmdir $TMPIMGDIR
)

mount $device_mount
ls -la $device_mount
df $device_mount
echo "Unmount $device_mount"
umount $device_mount
eject $device

HTH,

luke

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to