table of contents
cdbackup(1) | cdbackup(1) |
NAME¶
cdbackup - Streaming backup to CD-R(W)/DVR-R(W)SYNOPSIS¶
cdbackup [-mvwCDRVX] [-d device] [-r scsi-dev] [-s speed][-i image] [-p num] [-l size] [-a label]
[-c command] [-- cdrecord-options]
DESCRIPTION¶
cdbackup is a utility to make streaming backups to CD-R(W)/DVD-R(W) disks. It's designed to work with any backup tool which writes the backup to stdout (like tar/cpio/afio). NOTE: this program REQUIRES that a recent version of cdrecord(1) (or cdrecord-ProDVD for DVD support) is present in the PATH. While you can perfectly append several sessions on CD-R(W) media, I didn't manage to make this work on DVD-R(W) media. To allow multiple, separate backups on these media, the concept of virtual images has been introduced.OPTIONS¶
- -d device
- The device name which is used for reading things like the
TOC from a (partly written) media.
- -r scsi-device
- The scsi device which is passed to cdrecord(1) (via
dev= scsi-device). Must be given as three, comma separated number:
scsibus,target,lun.
- -s speed
- The writing speed which is passed to cdrecord(1)
(via speed= speed).
- -p num
- The number of sectors (of 2048 byte) to use for padding
(see cdrecord(1) padsize).
- -X
- Enables the use of CDROM XA2 mode in cdrecord(1). By
default CDROM mode 1 is used. The default is possibly causing problems
during restore on certain kernel version/CDROM hardware combinations at
the end of the last session on a media. Sony drives doesn't support CDROM
XA 2 mode (see cdrecord(1) -multi).
- -R
- Enables DVD writing mode. Cdrecord-ProDVD is used to burn
DVD media, but it's called through a script called "dvdrecord".
You should set your cdrecord-ProDVD key and call cdrecord-ProDVD from
there.
- -i image
- Enables virtual image mode. The backup stream is written to
the given image file. The file is created if it doesn't exists. It's
mandatory to give an explicit media size with -l. Take care that the
created virtual image isn't larger that the media size you want to dump it
later. You can add up to 96 backups to an virtual image.
- -w
- Dump the virtual image specified with -i to real media.
Image dumps are written as single sessions always. If you have enabled
multi-disk mode and additional images are found, you're prompted for media
change, so that you can dump all images in turn.
- -l size
- For normal operation the media size is auto-detected from
the cdrecord ATIP information. If this fails or for virtual image mode use
this option to set the media size. This is used to calculate how much data
can be stored on the media.
- -C
- Disables creation of the datablock CRC checksum. There is
no real reason to use this option, unless you can't efford the extra 0,2%
media space that is used to store the checksum.
- -a label
- A text label to identify the backup set. The first 32
characters of this string are save with the backup.
- -c command
- The command which is executed whenever cdbackup needs to
request a new media in multi-disk mode. This command (or script) should
prompt the user and return after the recording device is ready again. The
command receives one argument, which is the device name passed with
-d. This can be used to issue commands to the device like ejecting
the media.
- -m
- Enables multi-disk mode. When the current media is filled,
a new media is requested (see option -c) and the backup is
continued. Backups can only be continued to empty media, this means you
cannot insert a partly filled media for continuation.
- -v
- Enables verbose mode.
- -D
- Enables DEBUG output (probably not useful for normal use).
- -V
- Prints out version information and exits.
- -- cdrecord-options
- Pass following options to cdrecord(1).
EXAMPLES¶
To create a tar archive of /home and output it to a 700 MB CD-R(W) on /dev/scd0 (scsi device 2,0):- tar cvf - /home | cdbackup -d /dev/scd0 -r 2,0 -l 700 -a
"Test Backup"
- tar cf - /usr | cdbackup -d /dev/sr1 -r 1,4,0 -s 12 -m -v
- tar cf - /usr | cdbackup -i /tmp/vimage -l 4488m
- tar cf - /home | cdbackup -i /tmp/vimage -l 4488m
- cdbackup -i /tmp/vimage -w -R -d /dev/cdrom -r 0,0,0 -s 4 -m -- driveropts=burnfree
KNOWN PROBLEMS¶
Certain combinations of CDROM drivers and kernel versions are causing a problem when restoring data. The restore process aborts with an read error close to the end of the session, while the data on the media is perfectly good. All CDR sessions written in track-at-once mode (which is unavoidable for multisessions) end in at least two unreadable runout sectors (for additional information refer to the file README.copy from the cdrecord package). As the kernel does some readahead on the device, it stumbles over these unreadable sectors before reaching the actual end of data. Some drivers are reporting to syslog but doesn't pass the error to the application, while others make the application fail. From user feedback, it seems that pure SCSI setups are mostly working fine, while ide-scsi setups are likely to fail. The author isn't able to provide a full solution, but some hints which may help:- 1.
- Update to a recent kernel.
- 2.
- Disable kernel readahead with option -R when restoring.
- 3.
- Increase the padsize with option -p. Use values >= 128.
- 4.
- Use option -X if your writer supports this (Sony drives doesn't supports this mode).
AUTHORS¶
Stefan Hülswitt <s.huelswitt@gmx.de>SEE ALSO¶
cdrestore(1), cdrecord(1)LICENSE¶
Copyright (c) 2000-2004 Craig Condit, Stefan Hülswitt.- 1.
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 2.
- Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
0.7.0 | Stefan Hülswitt |