The past.

In the good old days when all computer ran a flavor of DOS, backing up a big disk (sometimes upto 120 MB of data) was a snap. Just put the QC 2120 cartridge in the Jumbo Colorado tapedrive and that was the difficult part of it all.
After typing some magic spells on the command prompt, the tape would be rewound several times and eventually the drive would start recording.

After tens of minutes of whining and winding, the data would be secured for life. Not your life. Just the life of the tape inside the cartridge, and for that, random factors were most important.

Still, the QC 2120 tapes saved my small business several times due to DOS virus attacks.


The present.

Those days have gone. Now, in 2004, Hydrogen is running with twin 1.2 GB disks and a smaller 650 MB disk for buffering data. For backing up this kind of data I would need THREE tapes per event. And putting back data would be almost impossible.

So some months ago I purchased an Asus Quietrack CD Writer. And yesterday I made my second backup. This one was like it should have been:

so now is the time to tell the world how I did it.

The Drive.

The hard part was getting the drive working. For this I needed to change some files in order to get the drive recognized properly. The situation below, is for a 2.4 kernel. From 2.6 the ide-scsi part is built-in.
Now, this Asus is a normal IDE drive, but Linux insists on having a SCSI device for burning CD's. No problem, after I found out where to change things.

File: /etc/lilo.conf

Below are the contents of my '/etc/lilo.conf' file. The essential parts are at the bottom in the line

  append = "hdb=ide-scsi"
  
Here we signal the kernel that hdb is NOT an IDE device, but a SCSI one.
     # LILO configuration file
     # generated by 'liloconfig'
     #
     # Start LILO global section
     boot = /dev/hda
     message = /boot/boot_message.txt
     prompt
     timeout = 100
     # Override dangerous defaults that rewrite the partition table:
     change-rules
       reset
     # Normal VGA console
     vga = normal
     # End LILO global section
     # Linux bootable partition config begins
     image = /vmlinuz
       root = /dev/hda3
       label = Linux
       read-only
       append = "hdb=ide-scsi"
     # Linux bootable partition config ends
     # DOS bootable partition config begins
     other = /dev/hda1
       label = DOS
       table = /dev/hda
     # DOS bootable partition config ends
   

Be very careful with the quotes in the 'append' line. Everything AFTER the '=' sign must be in double quotes. And the content of the double quotes will be appended to the booting parameters.

Also, don't forget to run 'lilo' to install the newly made startup record.

File: /etc/rc.d/rc.local

This file contains the specific drivers that need to be loaded before it will be fully functional. The contents are as follows:

    #!/bin/sh
    #
    # /etc/rc.d/rc.local:  Local system initialization script.
    #
    # Put any local setup commands in here:
    
    insmod ide-scsi
   
And that's it! Linux now knows that /dev/hdb is an IDE device in a SCSI dress.

Since you changed your Lilo bootrecord it is advisable to restart your computer in order to have the new settings take effect.

Making the backup.

Now is the time to prepare for making your backup. This is done in a two step approach:

For the first we use a program called 'mkisofs' and for the latter we use a program appropriately called 'cdrecord'.

Below you can see how these programs can be used. If you need special arrangements, first consult the man pages, then go to IRC chat and if everything else fails, contact me.

File: /root/backup.home

Below you will find the contents of the shell script I made for backing up my '/home' directory tree.

     #! /bin/sh

     mkisofs -R -L -D -o /backup/Backup.img /home
     cdrecord speed=16 -v dev=0,0,0 fs=16M /backup/Backup.img
     eject /cdrom
   
I have tested this scriptfile and the commands work when executed line by line. That's a good sign. I chose 'speed=16' since my system is not too fast (200 MHz IDT WinChip with 64 MB RAM).

Command: mkisofs -R -L -D -o /backup/Backup.img /home

With this command I order Linux to make an ISO filesystem on directory '/backup' called 'Backup.img'.

I order Linux to get the contents for this image from all files in the '/home' filesystem.

-R use Rockridge format Unix typical filenames
-L files that start with a '.' must be taken along
-D Deep directory scanner on
-o send output to the following file

Command: cdrecord speed=32 -v dev=0,0,0 fs=16M filename

speed = 32 tells 'cdrecord' that this media will accept 32 speed writing of disks. Take care here. Always take the lowest speed for writing if your drive and media do not have the same specs.
-v verbose mode. This means: talk to me as much as you can. And 'cdrecord' is VERY chatty! You should see a typical screen during writing an OTP CD ROM.
dev=0,0,0 This is the SCSI ID of the CD Writer drive. You can find it by entering the command 'cdrecord scanbus' on a command line. In my case, the drive was known to the system as '0,0,0'.
fs=16M Use a data-fifo buffer of 16 Megabytes. During writing, cdrecord shows on screen how full the fifo is. When done it tells how many times the buffer was full and empty. If you are low on memory, allocate less fifospace. 8 Megabytes should also be enough, depending on writing speed.
filename This is the name of the file, which you just made with the 'mkisofs' program. Make sure you include the full pathname.

Command: eject /cdrom

This command unmounts the CD-ROM drive and then opens the tray so that you can easily remove the precious disk.

The future.

Now that I can make backups on OTP (One Time Programmable) CD-ROM's, I feel much safer. On the other hand, each month or so I burn a CD and the old backup is converted to waste, by that action. It has become "yesterday's newspaper" in 10 minutes time.

On the other hand, a blank CD-ROM costs less than EUR 0,20 in Germany so now I have a lot of backuped backups. I want to keep all backups of the previous year so I can fall back on very old versions of current projects.

Page created in January 2004,

Page equipped with FroogleBuster technology