cdbackup.1
author nathan
Sat, 29 Dec 2007 15:28:06 +0100
branchtrunk
changeset 8 a306b5e43b44
parent 4 79da91042fcc
child 15 a9348bf5f6e7
permissions -rw-r--r--
release 0.7.0
     1 .TH "cdbackup" "1" "0.7.0" "Stefan Hülswitt" ""
     2 .SH "NAME"
     3 .LP 
     4 cdbackup \- Streaming backup to CD\-R(W)/DVR\-R(W)
     5 .SH "SYNOPSIS"
     6 .LP 
     7 cdbackup [\-mvwCDRVX] [\-d \fIdevice\fP] [\-r \fIscsi\-dev\fP] [\-s \fIspeed\fP]
     8          [\-i \fIimage\fP] [\-p \fInum\fP] [\-l \fIsize\fP] [\-a \fIlabel\fP]
     9          [\-c \fIcommand\fP] [\-\- \fIcdrecord\-options\fP]
    10 .SH "DESCRIPTION"
    11 .LP 
    12 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).
    13 .LP 
    14 \fINOTE:\fR this program REQUIRES that a recent version of \fBcdrecord\fR(1) (or
    15 cdrecord\-ProDVD for DVD support) is present in the PATH.
    16 .LP 
    17 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.
    18 .br 
    19 A virtual image is a plain file on your harddisk. You can append several backups to an image and after completing your backup session, the image is dumped to CDR/DVD media in one burning session. You can dump the same image multiple times too, if you want redundancy on the CDR/DVD media.
    20 .br 
    21 Virtual image files are never deleted by cdbackup. After dumping an image, you have to delete it by your self.
    22 .LP 
    23 \fIWARNING!\fR When using this program under Linux, be sure not to use dump on a mounted
    24 filesystem. This has a high potential for creating corrupted backups. As of kernel version
    25 2.4.19, this has not been fixed and it may not be fixed at all.
    26 You can read Linus statement about this at <http://search.alphanet.ch/cgi\-bin/search.cgi?max_results=10&type=long&msgid=Pine.LNX.4.21.0104270953280.2067\-100000@penguin.transmeta.com&domain=ml\-linux\-kernel>
    27 .SH "OPTIONS"
    28 .LP 
    29 .TP 
    30 \fB\-d\fR \fIdevice\fP
    31 The device name which is used for reading things like the TOC from a (partly written) media.
    32 .br 
    33 (default: /dev/burner)
    34 
    35 .TP 
    36 \fB\-r\fR \fIscsi\-device\fP
    37 The scsi device which is passed to \fBcdrecord\fR(1) (via dev=\fIscsi\-device\fP). Must be given as three, comma seperated number: \fIscsibus\fR,\fItarget\fR,\fIlun\fR.
    38 .br 
    39 (default: none or the contents of the environment variable CDR_DEVICE)
    40 
    41 .TP 
    42 \fB\-s\fR \fIspeed\fP
    43 The writing speed which is passed to \fBcdrecord\fR(1) (via speed=\fIspeed\fP).
    44 .br 
    45 (default: 4 or the contents of the environment variable CDR_SPEED)
    46 
    47 .TP 
    48 \fB\-p\fR \fInum\fP
    49 The number of sectors (of 2048 byte) to use for padding (see \fBcdrecord\fR(1) padsize).
    50 .br 
    51 (default: 15)
    52 
    53 .TP 
    54 \fB\-X\fR
    55 Enables the use of CDROM XA2 mode in \fBcdrecord\fR(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 \fBcdrecord\fR(1) \-multi).
    56 
    57 .TP 
    58 \fB\-R\fR
    59 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.
    60 .br 
    61 Remember that you cannot write multiple sessions to DVD media. Either you stick with one backup per media or you have to use virtual images.
    62 .br 
    63 In DVD mode the options \-p and \-X have no effect.
    64 
    65 .TP 
    66 \fB\-i\fR \fIimage\fP
    67 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 lager that the media size you want to dump it later.
    68 You can add up to 96 backups to an virtual image.
    69 .br 
    70 If the backup extends the specified media size and you have enabled multi\-disk mode, additional images files are created (the filenames are derived from the inital image name by adding a dot and a decimal number).
    71 .br 
    72 (default: none)
    73 
    74 .TP 
    75 \fB\-w\fR
    76 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.
    77 .br 
    78 Virtual images (even when dumped to media) are not compatible with older cdbackup versions.
    79 
    80 .TP 
    81 \fB\-l\fR \fIsize\fP
    82 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.
    83 .br 
    84 By default the given value is taken as megabytes. You can append a single letter to the number to select: (k)ilobytes, (m)egabytes, (g)igabytes or (s)ectors (e.g. 170k, 4488m, 350000s).
    85 .br 
    86 (default: auto\-detect)
    87 
    88 .TP 
    89 \fB\-C\fR
    90 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.
    91 .br 
    92 Although the on\-disk layout of checksumed backups is different, they are fully backwards compatible with older version of cdbackup, but obviously older versions can't check the backup integrity.
    93 
    94 .TP 
    95 \fB\-a\fR \fIlabel\fP
    96 A text label to identify the backup set. The first 32 characters of this string are save with the backup.
    97 .br 
    98 (default: "CDBackup Track")
    99 
   100 .TP 
   101 \fB\-c\fR \fIcommand\fP
   102 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 \fB\-d\fR. This can be used to issue commands to the device like ejecting the media.
   103 .br 
   104 (default: use internal diskchange prompt)
   105 
   106 .TP 
   107 \fB\-m\fR
   108 Enables multi\-disk mode. When the current media is filled, a new media is requested (see option \fB\-c\fR) and the backup is continued. Backups can only be continued to empty media, this means you cannot insert a partly filled media for continuation.
   109 
   110 .TP 
   111 \fB\-v\fR
   112 Enables verbose mode.
   113 
   114 .TP 
   115 \fB\-D\fR
   116 Enables DEBUG output (probably not usefull for normal use).
   117 
   118 .TP 
   119 \fB\-V\fR
   120 Prints out version information and exits.
   121 
   122 .TP 
   123 \fB\-\-\fR \fIcdrecord\-options\fP
   124 Pass following options to \fBcdrecord\fR(1).
   125 .SH "EXAMPLES"
   126 .LP 
   127 To create a tar archive of /home and
   128 output it to a 700 MB CD\-R(W) on /dev/scd0 (scsi device 2,0):
   129 .IP 
   130 tar cvf \- /home | cdbackup \-d /dev/scd0 \-r 2,0 \-l 700 \-a "Test Backup"
   131 
   132 .LP 
   133 To create a tar archive of /usr and output it to a series (multi\-disk mode) of 650 MB CD\-R(W) on /dev/sr1 (scsi device 1,4,0) with writting speed 12 and verbose output:
   134 .IP 
   135 tar cf \- /usr | cdbackup \-d /dev/sr1 \-r 1,4,0 \-s 12 \-m \-v
   136 
   137 .LP 
   138 To create a backup on a virtual image:
   139 .IP 
   140 tar cf \- /usr | cdbackup \-i /tmp/vimage \-l 4488m
   141 
   142 .LP 
   143 Add another backup to the same virtual image (with multi\-disk mode):
   144 .IP 
   145 tar cf \- /home | cdbackup \-i /tmp/vimage \-l 4488m
   146 
   147 .LP 
   148 Dump the virtual image to one (or several) DVD media on /dev/cdrom (scsi\-ide device 0,0,0), enabling BURNFREE:
   149 .IP 
   150 cdbackup \-i /tmp/vimage \-w \-R \-d /dev/cdrom \-r 0,0,0 \-s 4 \-m \-\- driveropts=burnfree
   151 .SH "KNOWN PROBLEMS"
   152 .LP 
   153 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.
   154 .LP 
   155 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.
   156 .LP 
   157 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.
   158 .LP  
   159 The author isn't able to provide a full solution, but some hints which may help:
   160 .TP 
   161 1.
   162 Update to a recent kernel.
   163 .TP 
   164 2.
   165 Disable kernel readahead with option \-R when restoring.
   166 .TP 
   167 3.
   168 Increase the padsize with option \-p. Use values >= 128.
   169 .TP 
   170 4.
   171 Use option \-X if your writer supports this (Sony drives doesn't supports this mode).
   172 .LP 
   173 Please contact the author if you can contribute additional information about the problem.
   174 .SH "AUTHORS"
   175 .LP 
   176 Stefan Hülswitt <s.huelswitt@gmx.de>
   177 .SH "SEE ALSO"
   178 .LP 
   179 \fBcdrestore\fR(1), \fBcdrecord\fR(1)
   180 .SH "LICENSE"
   181 Copyright (c) 2000\-2004 Craig Condit, Stefan Hülswitt.
   182 
   183 Redistribution and use in source and binary forms, with or without
   184 modification, are permitted provided that the following conditions are met: 
   185 
   186 .TP 
   187 1.
   188 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
   189 .TP 
   190 2.
   191 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.
   192 
   193 .LP 
   194 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
   195 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   196 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   197 DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   198 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   199 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   200 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   201 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   202 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   203 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   204 SUCH DAMAGE.