FreeBSD Manual Pages
CDBKUP(1) General Commands Manual CDBKUP(1) NAME cdbkup - Backup a filesystem to one or more CD-R(W)s SYNOPSIS cdbkup 0-9 [ --help ] [ -1, --single ] [ -a, --append ] [ -b, --blank ] [ -c, --compress=TYPE ] [ -e, --exclude=PATH ] [ -h, --host=HOST ] [ -I, --no-iso ] [ -l, --label=NAME ] [ -m, --cross-mp ] [ -r, --recycle ] [ -s, --speed=SPEED ] [ -S, --cdsize=SIZE ] [ -t, --test ] [ -V, --version ] [ -w, --workdir=PATH ] [ -z, --zip-here ] DEVICE DUMPDIR OPTIONS 0-9 Specify the backup level. See the section on BACKUP LEVELS for more info. --help Show usage message and quit. -1, --single Burn the last disk in single session mode. Normally, the last disk is burned in multisession mode, allowing for additional data to be appended to the end of it. This option has no effect when used with --append or --recycle, since in these cases, the burn is always done in multisession mode. -a, --append Append the backup onto the end of a multisession disk. If the disk is empty, then create the first session. When this option is used, the program runs non-interactively, and the entire backup must fit in the available space on the disk. Make sure to insert the correct disk before running the program. If this option is used in conjunction with --blank (-b), then the disk is blanked first, and the entire image must fit on the blank CD. See also --recycle. -b, --blank Blank all disks before writing. This option may not be used in con- junction with --recycle (-r). -c, --compress=TYPE Compress using the specified compression format. Possible options are gz for gzip compression, bz2 for bzip2 compression or none for no compression. The default is gz. -e, --exclude=PATH Excludes the specified file or directory from the backup. This op- tion may be specified multiple times. -h, --host=HOST Specify the hostname whose filesystem is to be backed up. The CD burner is assumed to be on the localhost. The transfer is done via SSH, so make sure that the remote machine is running an SSH server, and that the local machine has an SSH client installed. If this pa- rameter is not specified, then the local machine is backed up. -I, --no-iso This option can only be used in conjunction with both --test and --cdsize. It prevents the backup tarballs from being rolled up into ISO files. See the --cdsize (-S) option for more information. -l, --label=NAME Set the backup volume label. If the backup directory is anything other than '/', then this parameter is required. Otherwise, the de- fault volume label is the hostname of the machine being backed up. To generate the filenames for the CD images, cdbkup appends three things to the volume label: the current date, the backup level, and the extension .tar.gz. If the entire image fits on one disk, then this filename is exact. Otherwise, a dot and the disk number are appended to the filename on each disk, after the file extension. -m, --cross-mp Cross between filesystems when dumping. By default, cdbkup ignores mount points within the directory tree being backed up. This option causes cdbkup to include these mount points as though they were plain subdirectories. You can use the --exclude option to explicitly exclude mount points that you don't want, such as /proc and /usb under Linux. -r, --recycle Same as --append, except that the disk is blanked first if the data doesn't fit in the available space. If the data is too large to fit even on a blank CD, then the CD is not blanked, but this program re- turns an error. This option conflicts with --append and --blank. -s, --speed=SPEED Set the burn speed. The default is 2. -S, --cdsize=SIZE Specify the size of the output media in bytes. Normally, cdbkup at- tempts to autodetect the size of the disk and uses a default of 650,000,000 bytes if autodetection fails. This option disables au- todetection. Unless --no-iso is specified, SIZE must be large enough to account for both high-level and low-level filesystem overhead. So you should expect any ISO images to be significantly smaller than the given value. If --no-iso is specified then SIZE is the exact maxi- mum filesize. -t, --test Do not use the CD-ROM burner. In this mode, the backup proceeds normally, except that the backup file(s) are saved to the current directory instead of being burned onto CD-R(W)s. The output is nor- mally a single tarball. If --cdsize is specified then the output is one or more ISO images. If both --cdsize and --no-iso are speci- fied, then the output is one or more tarballs. If -t is used, the following options are ignored: -1, -a, -b, -r, -s. -V, --version Print the version number and exit. -w, --workdir=PATH Set the working directory as specified. The default is /tmp/cd- workdir. Except in the case of remote backups, this directory is automatically excluded from the backup. (See the --exclude option.) -z, --zip-here For remote backups, perform compression locally. This has the ad- vantage of decreased CPU load on the remote machine, but the disad- vantage of increased network traffic. This option has no effect on local backups. DESCRIPTION This manual page documents briefly the cdbkup filesystem backup utility. cdbkup backs up the filesystem under the specified directory to one or more CD-R(W)s. It can run either interactively, for large backups, or non-in- teractively, for backups that you expect to fit on a single disk. In interactive mode, the program asks you to insert CDs at the appropriate times, and offers you the ability to retry in case of errors. In non-in- teractive mode (using -a or -r), the program expects the target CD to al- ready be in the drive. If an error occurs, the program prints an error message and returns a non-zero status code. To restore a filesystem, begin with a blank filesystem, and use cdrstr (1) to restore the most recent backups at each level, beginning with the lowest level and increasing. DEVICES The device specified on the command line is the SCSI device for the CD-ROM burner. For more information, see the dev= option of cdrecord (1). BACKUP LEVELS The range of backup levels (0-9) facilitates a variety of backup strate- gies. Level 0 always performs a full backup. Higher-level backups usually perform incremental backups, and they only save the changes since the most recent backup of a lower level. So, for instance, monthly backups could be performed at level 0, weekly backups at level 3 and daily backups at level 5. Thus, the daily backups would only save changes since the beginning of the week, and the weekly backups would only save changes since the begin- ning of the month. When restoring (using cdrstr (1)), the most recent level 0 backup would have to be restored, followed by the most recent level 3 backup, then by the most recent level 5 backup. It is recommended to use the --append or --recycle options for daily back- ups, since many will often fit on the same CD. But for safety, you should alternate between two or more CD-RWs so that, even in the case of failure, you still have a quite recent backup. Note that you can't put more than one backup performed on the same day of the same filesystem or directory on the same CD-R(W), since the filenames would be identical. In general, it's unusual to perform backups more than once per day, but if you must then use a different CD-R(W). EXAMPLES cdbkup 0 -e /tmp -s 4 0,0,0 / Does a full (level 0) backup of the local root directory, excluding /tmp onto (maybe) multiple CD-Rs, burning at 4-speed. The CD-Rs must already be blank. cdbkup 0 -b -e /tmp -s 4 0,0,0 / Same as above, but blanks all disks (which must be CD-RWs) before writing the backup images. cdbkup 0 -h my.webserver.org -e /tmp 0,0,0 / Does a full backup of a remote webserver, excluding /tmp onto (maybe) multiple CD-Rs. Compression is performed on the webserver machine in order to save on bandwidth. cdbkup 0 -h my.webserver.org -z 0,0,0 / Same as above, except that the /tmp directory is included in the backup, and compression is performed locally in order to avoid load- ing the webserver's CPU. cdbkup 5 -a -e /tmp 0,0,0 / Does a level 5 incremental backup of the local root directory, ex- cluding /tmp onto the remaining space on a multisession CD-R. If the backup doesn't fit, an error is thrown. cdbkup 5 -r -e /tmp 0,0,0 / Same as above, but if the backup doesn't fit, blanks the disk, then writes the backup. SEE ALSO cdappend(1), cdcat(1), cdrecord(1), cdrstr(1), cdsplit(1). AUTHOR John-Paul Gignac <jp@gignac.org> Mar 6, 2002 CDBKUP(1)
NAME | SYNOPSIS | OPTIONS | DESCRIPTION | DEVICES | BACKUP LEVELS | EXAMPLES | SEE ALSO | AUTHOR
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=cdbkup&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>
