Tonic for your Backup Woes: CD Backups In Linux (Part One) - Page 3

 By Carla Schroder | Posted Jan 8, 2003
Page 3 of 3   |  Back to Page 1
Print Article

Burning Disks

Burning a disk is a two-step process. First create an ISO9660 image, then burn the image to disk. mkisofs creates filesystems, while cdrecord controls the actual writing to disk.

$ mkisofs -o monday_backup.iso -JRVv /home/carla/

-o specifies the backup filename
-J use Joliet naming records, for Windows compatibility
-R Rock Ridge naming conventions for preserving filename length and cases, for UNIX/Linux
-V Volume ID- this is the disk name that shows up in Windows Explorer
-v verbose, for a running commentary as the image is created

Test The Image

Mount the image to verify everything is OK and to lessen the risk of creating a coaster:

# mount -t iso9660 -o ro,loop=/dev/loop0 monday_backup.iso /cdrom

This mounts it in the /cdrom directory, and if the image is error-free, all the files and directories you selected should appear.

Now that you have a nice ISO image, find the SCSI device address of your CD writer, as root:

# cdrecord -scanbus
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jvrg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
0,0,0 0) 'TOSHIBA ' 'DVD-ROM SD-M1202' '1020' Removable CD-ROM
0,1,0 1) 'LITE-ON ' 'LTR-24102B ' '5S54' Removable CD-ROM
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *

Burn, Baby

# cdrecord -v -eject speed=8 dev=0,1,0 monday_backup.iso

-v verbose
-eject eject when finished
-speed write speed
-dev device number from cdrecord -scanbus
And finally, enter the name of the image being burned.

To perform a quick erase on a CD-RW, which erases only the Table of Contents (TOC) and the Program Memory Area (PMA), type:

# cdrecord --dev=0,1,0 --blank=fast

To completely erase a disk, type:

# cdrecord --dev=0,1,0 --blank=all

Next week we'll dig more deeply into command options, automating CD backups, and restoring data from a CD.


Linux 2.4 SCSI subsystem HOWTO
CD Writing Howto

» See All Articles by Columnist Carla Shroder

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter

By submitting your information, you agree that enterprisenetworkingplanet.com may send you ENTERPRISENetworkingPLANET offers via email, phone and text message, as well as email offers about other products and services that ENTERPRISENetworkingPLANET believes may be of interest to you. ENTERPRISENetworkingPLANET will process your information in accordance with the Quinstreet Privacy Policy.