Re: Incremental CDR backups -- SOLVED

From: Paul M Foster (paulf_at_quillandmouse.com)
Date: 10/31/03

  • Next message: Rob Weir: "Re: GeForce4 MX440 with kernel 2.4.18-bf24"
    Date: Thu, 30 Oct 2003 23:39:09 -0500
    To: debian-user@lists.debian.org
    
    

    On Thu, Oct 30, 2003 at 03:05:47PM +0100, lorian@fsavigny.de wrote:

    >
    > Paul writes
    >
    > > > There must be something I don't understand about this. For the sake of
    > > > brevity, here's an example. First burn is /home/paulf/docs. It contains
    > > > the files alfa, bravo, charlie and delta. I make an ISO of this, stored
    > > > in /tmp/cdimage. I burn it to CDR and delete the /tmp/cdimage file. A
    > > > week later, I've updated the bravo file and added an echo file. Now I
    > > > make an ISO of the /home/paulf/docs directory, and burn that to
    > the CDR.
    > > > Now when I look on the CDR, what I see is the _original_ burn. All this
    > > > is using the commands I mentioned above (normally I'd snip email,
    > > > but...).
    >
    >
    > > > Now, my original thought was that mkisofs/cdrecord process would simply
    > > > add the new echo file, and show an updated version of the bravo file,
    > > > while leaving the rest alone. Sort of like the way it works on a hard
    > > > drive, except that the space taken up by the old versions of files
    > (like
    > > > bravo) would still be "used".
    >

    <snip>

    >
    > PS: in case anyone is interested, I have written two Perl scripts
    > intended to make full and incremental backups on CD-R more
    > convenient. The first puts a large number of files on several iso9660
    > CDs (without any archiving or compression, just like that) and the
    > second adds sessions to a multisession disk with some safety
    > measures. The first script also can collaborate with the second by
    > burning the last disk in multisession mode, so as to make the
    > remaining space available for further incremental backups. Both are
    > thoroughly tested by myself and work fine for me, although the
    > session-adding script is sometimes provoking errors from the SCSI
    > adaptor driver. This should be a problem of the latter (beta), not of
    > the script.
    >

    I'd be interested in your scripts. Meantime, I solved the original
    problem. I don't know what I was doing wrong, but I read every bit of
    documentation I could find and understand. Most helpful was the
    README.multi that comes with cdrecord. The following is roughly how it
    works:

    # FIRST Burn

    # Make image
    mkisofs -r -o /tmp/cdimage /home/paulf/cdrom
    # Test image
    mount /tmp/cdimage -r -t iso9660 -o loop /cdrom
    mc /cdrom
    umount /cdrom
    # Actual burn
    cdrecord -v -multi speed=4 dev=0,0 /tmp/cdimage
    # Test CDR
    mount -t iso9660 -o ro /dev/cdrom /cdrom
    mc /cdrom
    umount /cdrom
    # Delete image
    rm /tmp/cdimage

    # LATER burns

    # Make image
    TRACK=`cdrecord -msinfo dev=0,0`
    mkisofs -o /tmp/cdimage -r -C $TRACK -M /dev/cdrom /home/paulf/cdrom
    # Test image
    TRACK=`cdrecord -msinfo dev=0,0`
    FIRST=${TRACK%%,*}
    mkisofs -o /tmp/cdimage2 -r -C $FIRST,0 -M /dev/cdrom /home/paulf/cdrom
    mount /tmp/cdimage2 -r -t iso9660 -o loop /cdrom
    mc /cdrom
    umount /cdrom
    rm /tmp/cdimage2
    # Actual burn
    cdrecord -v -multi speed=4 dev=0,0 /tmp/cdimage
    # Test CDR
    mount -t iso9660 -o ro /dev/cdrom /cdrom
    mc /cdrom
    umount /cdrom
    # Delete image
    rm /tmp/cdimage

    Some notes: It is possible to determine if a disk has been burned before
    by checking the results of cdrecord -multi dev=0,0. If empty, then so is
    the disk. This would allow a script to determine which branch to take
    (virgin or already burned). Also in testing the above, I also note that
    sometimes the kernel is dumb about what's on the CDR. Apparently, when
    testing the image burned on the CDR from later sessions, Linux will
    sometimes think nothing has changed from the last burn. It appears that
    if you eject the disk, it usually resolves this problem. It may be that
    a simple sync command will do the same thing. But lack of doing this may
    lead the user into believing that their burn was unsuccessful somehow,
    even though the system appeared to actually burn the CD.

    Paul

    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Rob Weir: "Re: GeForce4 MX440 with kernel 2.4.18-bf24"

    Relevant Pages

    • Re: automatic moving files in to folders
      ... I'd like to burn them to CD. ... What i'm trying to accomplish is to have a ... script that will check the size of the file, create a folder called disk1, ... get as close to but not over 700 mb so i can burn disk by disk. ...
      (comp.unix.shell)
    • Re: Burning MP3 Data onto DVD Problem
      ... I am trying to burn an MP3 Data disk but onto a DVD (instead of a CDR). ...
      (microsoft.public.windowsmedia)
    • Re: mounting a burned CD
      ... I'm not sure of the other errors, but I use the following code snippit to ... determine the size before I burn a disk. ... I will put that in the script. ...
      (comp.os.linux.misc)
    • Re: burning DVD failure
      ... The script showed me 3 devices, ... I just attempted to burn a DVD on my DELL GX-280 with 2Gb of RAM, ... The recorder or the media cannot write ...
      (microsoft.public.scripting.vbscript)
    • Re: burning DVD failure
      ... Before I ever got my first CD burner I knew all about the basic problems of optical media burning. ... The hollow incident - that sounds like purely a bad burn problem back when: ... should be possible from script without an awful lot of trouble. ... > The one with RW properties is DVD+ RW DVD8631. ...
      (microsoft.public.scripting.vbscript)

    Loading