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

By Carla Schroder | Jan 8, 2003
Page 3 of 3   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn


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'
scsibus0:
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.


Resources

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
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >