cdbackup.1
author nathan
Thu, 04 Oct 2012 12:48:27 +0200
branchtrunk
changeset 15 a9348bf5f6e7
parent 8 a306b5e43b44
permissions -rw-r--r--
documentation update, bump version
nathan@15
     1
.TH "cdbackup" "1" "0.7.1" "Stefan Huelswitt" ""
nathan@0
     2
.SH "NAME"
nathan@0
     3
.LP 
nathan@4
     4
cdbackup \- Streaming backup to CD\-R(W)/DVR\-R(W)
nathan@0
     5
.SH "SYNOPSIS"
nathan@0
     6
.LP 
nathan@4
     7
cdbackup [\-mvwCDRVX] [\-d \fIdevice\fP] [\-r \fIscsi\-dev\fP] [\-s \fIspeed\fP]
nathan@4
     8
         [\-i \fIimage\fP] [\-p \fInum\fP] [\-l \fIsize\fP] [\-a \fIlabel\fP]
nathan@15
     9
         [\-c \fIcommand\fP] [\-E \fIcdrecord\fP] [\-\- \fIcdrecord\-options\fP]
nathan@0
    10
.SH "DESCRIPTION"
nathan@0
    11
.LP 
nathan@4
    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).
nathan@4
    13
.LP 
nathan@4
    14
\fINOTE:\fR this program REQUIRES that a recent version of \fBcdrecord\fR(1) (or
nathan@4
    15
cdrecord\-ProDVD for DVD support) is present in the PATH.
nathan@4
    16
.LP 
nathan@4
    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.
nathan@4
    18
.br 
nathan@4
    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.
nathan@4
    20
.br 
nathan@4
    21
Virtual image files are never deleted by cdbackup. After dumping an image, you have to delete it by your self.
nathan@0
    22
.LP 
nathan@2
    23
\fIWARNING!\fR When using this program under Linux, be sure not to use dump on a mounted
nathan@2
    24
filesystem. This has a high potential for creating corrupted backups. As of kernel version
nathan@2
    25
2.4.19, this has not been fixed and it may not be fixed at all.
nathan@2
    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>
nathan@0
    27
.SH "OPTIONS"
nathan@0
    28
.LP 
nathan@0
    29
.TP 
nathan@0
    30
\fB\-d\fR \fIdevice\fP
nathan@0
    31
The device name which is used for reading things like the TOC from a (partly written) media.
nathan@0
    32
.br 
nathan@0
    33
(default: /dev/burner)
nathan@0
    34
nathan@0
    35
.TP 
nathan@0
    36
\fB\-r\fR \fIscsi\-device\fP
nathan@2
    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.
nathan@0
    38
.br 
nathan@4
    39
(default: none or the contents of the environment variable CDR_DEVICE)
nathan@0
    40
nathan@0
    41
.TP 
nathan@0
    42
\fB\-s\fR \fIspeed\fP
nathan@2
    43
The writing speed which is passed to \fBcdrecord\fR(1) (via speed=\fIspeed\fP).
nathan@0
    44
.br 
nathan@4
    45
(default: 4 or the contents of the environment variable CDR_SPEED)
nathan@0
    46
nathan@0
    47
.TP 
nathan@0
    48
\fB\-p\fR \fInum\fP
nathan@0
    49
The number of sectors (of 2048 byte) to use for padding (see \fBcdrecord\fR(1) padsize).
nathan@0
    50
.br 
nathan@0
    51
(default: 15)
nathan@0
    52
nathan@0
    53
.TP 
nathan@0
    54
\fB\-X\fR
nathan@2
    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).
nathan@0
    56
nathan@0
    57
.TP 
nathan@4
    58
\fB\-R\fR
nathan@15
    59
Enables DVD writing mode. Make sure that your \fBcdrecord\fR(1) version is able to burn DVD media.
nathan@4
    60
.br 
nathan@4
    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.
nathan@4
    62
.br 
nathan@4
    63
In DVD mode the options \-p and \-X have no effect.
nathan@4
    64
nathan@4
    65
.TP 
nathan@15
    66
\fB\-E\fR \fIcdrecord\fP
nathan@15
    67
Set an alternate cdrecord executeable.
nathan@15
    68
.br 
nathan@15
    69
(default: "cdrecord")
nathan@15
    70
nathan@15
    71
.TP 
nathan@4
    72
\fB\-i\fR \fIimage\fP
nathan@4
    73
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.
nathan@4
    74
You can add up to 96 backups to an virtual image.
nathan@4
    75
.br 
nathan@4
    76
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).
nathan@4
    77
.br 
nathan@4
    78
(default: none)
nathan@4
    79
nathan@4
    80
.TP 
nathan@4
    81
\fB\-w\fR
nathan@4
    82
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.
nathan@4
    83
.br 
nathan@4
    84
Virtual images (even when dumped to media) are not compatible with older cdbackup versions.
nathan@4
    85
nathan@4
    86
.TP 
nathan@0
    87
\fB\-l\fR \fIsize\fP
nathan@4
    88
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.
nathan@4
    89
.br 
nathan@4
    90
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).
nathan@4
    91
.br 
nathan@4
    92
(default: auto\-detect)
nathan@4
    93
nathan@4
    94
.TP 
nathan@4
    95
\fB\-C\fR
nathan@4
    96
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.
nathan@4
    97
.br 
nathan@4
    98
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.
nathan@0
    99
nathan@0
   100
.TP 
nathan@0
   101
\fB\-a\fR \fIlabel\fP
nathan@0
   102
A text label to identify the backup set. The first 32 characters of this string are save with the backup.
nathan@0
   103
.br 
nathan@0
   104
(default: "CDBackup Track")
nathan@0
   105
nathan@0
   106
.TP 
nathan@0
   107
\fB\-c\fR \fIcommand\fP
nathan@0
   108
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.
nathan@0
   109
.br 
nathan@0
   110
(default: use internal diskchange prompt)
nathan@0
   111
nathan@0
   112
.TP 
nathan@0
   113
\fB\-m\fR
nathan@0
   114
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.
nathan@0
   115
nathan@0
   116
.TP 
nathan@0
   117
\fB\-v\fR
nathan@0
   118
Enables verbose mode.
nathan@0
   119
nathan@0
   120
.TP 
nathan@2
   121
\fB\-D\fR
nathan@2
   122
Enables DEBUG output (probably not usefull for normal use).
nathan@2
   123
nathan@2
   124
.TP 
nathan@0
   125
\fB\-V\fR
nathan@0
   126
Prints out version information and exits.
nathan@0
   127
nathan@0
   128
.TP 
nathan@0
   129
\fB\-\-\fR \fIcdrecord\-options\fP
nathan@2
   130
Pass following options to \fBcdrecord\fR(1).
nathan@0
   131
.SH "EXAMPLES"
nathan@0
   132
.LP 
nathan@0
   133
To create a tar archive of /home and
nathan@0
   134
output it to a 700 MB CD\-R(W) on /dev/scd0 (scsi device 2,0):
nathan@0
   135
.IP 
nathan@0
   136
tar cvf \- /home | cdbackup \-d /dev/scd0 \-r 2,0 \-l 700 \-a "Test Backup"
nathan@0
   137
nathan@0
   138
.LP 
nathan@0
   139
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:
nathan@0
   140
.IP 
nathan@0
   141
tar cf \- /usr | cdbackup \-d /dev/sr1 \-r 1,4,0 \-s 12 \-m \-v
nathan@4
   142
nathan@4
   143
.LP 
nathan@4
   144
To create a backup on a virtual image:
nathan@4
   145
.IP 
nathan@4
   146
tar cf \- /usr | cdbackup \-i /tmp/vimage \-l 4488m
nathan@4
   147
nathan@4
   148
.LP 
nathan@4
   149
Add another backup to the same virtual image (with multi\-disk mode):
nathan@4
   150
.IP 
nathan@4
   151
tar cf \- /home | cdbackup \-i /tmp/vimage \-l 4488m
nathan@4
   152
nathan@4
   153
.LP 
nathan@4
   154
Dump the virtual image to one (or several) DVD media on /dev/cdrom (scsi\-ide device 0,0,0), enabling BURNFREE:
nathan@4
   155
.IP 
nathan@4
   156
cdbackup \-i /tmp/vimage \-w \-R \-d /dev/cdrom \-r 0,0,0 \-s 4 \-m \-\- driveropts=burnfree
nathan@2
   157
.SH "KNOWN PROBLEMS"
nathan@2
   158
.LP 
nathan@2
   159
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.
nathan@2
   160
.LP 
nathan@2
   161
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.
nathan@2
   162
.LP 
nathan@2
   163
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.
nathan@2
   164
.LP  
nathan@2
   165
The author isn't able to provide a full solution, but some hints which may help:
nathan@2
   166
.TP 
nathan@2
   167
1.
nathan@2
   168
Update to a recent kernel.
nathan@2
   169
.TP 
nathan@2
   170
2.
nathan@2
   171
Disable kernel readahead with option \-R when restoring.
nathan@2
   172
.TP 
nathan@2
   173
3.
nathan@2
   174
Increase the padsize with option \-p. Use values >= 128.
nathan@2
   175
.TP 
nathan@2
   176
4.
nathan@2
   177
Use option \-X if your writer supports this (Sony drives doesn't supports this mode).
nathan@2
   178
.LP 
nathan@2
   179
Please contact the author if you can contribute additional information about the problem.
nathan@0
   180
.SH "AUTHORS"
nathan@0
   181
.LP 
nathan@15
   182
Stefan Huelswitt <s.huelswitt@gmx.de>
nathan@0
   183
.SH "SEE ALSO"
nathan@0
   184
.LP 
nathan@0
   185
\fBcdrestore\fR(1), \fBcdrecord\fR(1)
nathan@0
   186
.SH "LICENSE"
nathan@15
   187
Copyright (c) 2000\-2012 Craig Condit, Stefan Huelswitt.
nathan@0
   188
nathan@0
   189
Redistribution and use in source and binary forms, with or without
nathan@0
   190
modification, are permitted provided that the following conditions are met: 
nathan@0
   191
nathan@0
   192
.TP 
nathan@0
   193
1.
nathan@0
   194
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
nathan@0
   195
.TP 
nathan@0
   196
2.
nathan@0
   197
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.
nathan@0
   198
nathan@0
   199
.LP 
nathan@0
   200
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
nathan@0
   201
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
nathan@0
   202
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
nathan@0
   203
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
nathan@0
   204
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
nathan@0
   205
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
nathan@0
   206
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
nathan@0
   207
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
nathan@0
   208
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
nathan@0
   209
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
nathan@0
   210
SUCH DAMAGE.