Mailinglist Archive: opensuse (2912 mails)

< Previous Next >
Re: [SLE] Backup to CD/DVD -- recommended software?
  • From: Christopher Carlen <crcarle@xxxxxxxxxx>
  • Date: Tue, 01 Feb 2005 14:59:28 -0800
  • Message-id: <420009D0.8060505@xxxxxxxxxx>
Paul W. Abrahams wrote:
I've got a pretty common need: backing up a directory to CD/DVD. The obvious solution is to use K3B -- but alas, it doesn't work right. When K3B creates a project for a directory it saves the directory contents at the time of creating the project. Then, when it attempts to write the directory at future times, it uses that very same file list, even though some members and submembers of the directory may have been deleted and (worse) others may have been added. This particular bit of behavior is to me at least inexplicable, but I see no way around it other than to create a new project every time -- which, for various reasons, I do not want to do.

So can someone recommend a CD-writing utility with functionality similar to K3B but that does not have that particular design flaw? I'd much prefer something that's part of the standard SuSE distribution, and I definitely don't want commercial software.


Actually, for something repetitive like this, a GUI program is NOT the obvious solution. A script is.

Here is the script I have used for CD-R(W) backup of a specific directory until just now beginning to experiment with DVDs:

First the backup.settings file:

----------------------------------
# The backup.settings file
CDRW_SCSI_DEV=ATA:3,0,0
CDRW_DEV_PATH=/dev/cdrw
----------------------------------

Next is the CD-RW backup script. Just take out the -blank option for CD-R, and a few other minor tweaks to use it on CD-R:

----------------------------------
#!/bin/bash
echo We are in the datasheets.CD-RW.backup script!

source ~/backup.scripts/backup.settings

mkisofs -o ~/cd-rw/datasheets.backup.iso -R -J -v -graft-points ~/datasheets

echo \n
du -h ~/cd-rw/datasheets.backup.iso
echo \n
echo Press Enter to continue or Ctrl-Cto exit...
read REPLY

cdrecord dev=$CDRW_SCSI_DEV -v blank=fast -dao ~/cd-rw/datasheets.backup.iso

cdrecord dev=$CDRW_SCSI_DEV -eject
cdrecord dev=$CDRW_SCSI_DEV -load

echo \n
md5sum ~/cd-rw/datasheets.backup.iso
md5sum $CDRW_DEV_PATH
echo \n
echo Press Enter or close when done...

read REPLY

exit
---------------------------------------------------

Obviously it desires a directory in your home called "cd-rw" to create ISOs.

It verifies that the burn=the ISO file afterwards. I have had many troubles with this, failing to match md5sums or getting IO errors reading back the disk. After a reboot and manually doing the md5sums would work fine. This is a driver/drive resetting issue. That is the reason for the eject/load actions, which fixes it usually, but I have one machine that still gives problems.

xcdroast uses some options to readcd to do this correctly, and someday I may try that more sophisticated approach.

But this is the basic idea of how to automate the backup process.

Connect this script to a KDE panel button and you have a one-click backup. Far more efficient than using a GUI program. It pays to learn the CLI tools for CD/DVD burning. But don't feel bad if they seem formidable. I have many hours of experimenting and frustration invested in even this simple script.


Good day!


--
____________________________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
crcarle@xxxxxxxxxx

< Previous Next >
Follow Ups