NAME

backup - backs up local and/or remote data to disk


SYNOPSIS

backup [options]

 Options:
   --config <f>         read configuration from <f>
   --nosyslog           log to stdout instead of syslog
   --all                backup all filesystems in configuration file
   --level <l>          perform a level <l> backup
   --fs <f>             a directory to back up, or host:directory
   --help               print a usage summary
   --man                read the full man page


DESCRIPTION

The backup program uses GNU tar, bzip2, and ssh to back up local and remote directory structures to disk. Any number of levels of backups are supported, with level 0 being a full backup and level n (where n > 0) being an incremental backup of all the changes since the last level n-1 backup.

Old backups are not automatically deleted, so you must manage backup retention separately by deleting old backup files.


OPTIONS

The following options may be specified on the command line. Some of these options may also be specified in the configuration file. When an option is specified in both places, the value from the command line is used. The configuration file is described in the CONFIGURATION FILE section.

--config f

Read configuration from file f. If not specified, configuration is read from /etc/backup/backup.conf. The configuration file is described in the CONFIGURATION FILE section.

--nosyslog

Log to stdout instead of syslog.

--all

Back up all filesystems listed in the configuration file. If this option is given, no filesystems need to be explicitly listed on the command line with the --fs option, and all filesystems listed with the Filesystems option in the configuration file will be backed up.

--level l

Specifies that a level l backup will be performed on the filesystems. The level may be any integer >= 0.

The corresponding configuration file option is Level.

--fs f

Specifies one or more filesystems to back up. Each filesystem may by either a local directory, or a remote directory of the form host:directory. To back up multiple filesystems, the --fs option may be given multiple times, or multiple filesystems may be given as one argument in a comma-separated list. For example, the following are all valid ways to specify that three filesystems should be backed up:

        --fs / --fs host1:/var --fs host2:/etc
        --fs /,host1:/var,host2:/etc
        --fs / --fs host1:/var,host2:/etc
--help

Print a usage summary and exit.

--man

Read the full man page for this program.


CONFIGURATION FILE

Options are specified in the configuration in lines that look like:

option=value

You may add any amount of whitespace on either side of the =, so the following will also work:

option = value

The following options may be specified in the configuration file:

Filesystems

Specifies the filesystems to back up. Each filesystem may be either a local directory or a remote directory of the form host:directory. To specify multiple directories, use a comma-separated list.

Level

Specifies that a level l backup will be performed on the filesystems. The level may be any integer >= 0.

Level0Frequency

Specifies the maximum number of days between level 0 backups. If a level 1 or greater backup is requested but the last level 0 backup is this number of days old or older, a level 0 backup will be run instead. If you make level 0 backups with a regular frequency, this option is useful to enforce that frequency.

By default, this option is not set, and a level 0 backup will never be forced.

BackupDirectory

The directory to which the completed backups will be written.

StateDirectory

The directory in which to keep data about when the last backup was performed for each filesystem.

SyslogFacility

Logging is done via syslog. The option specifies the syslog facility to use when logging.

SshIdentityFile

The SSH identity to use when running commands on remote systems. This identity should not have a passphrase. A good way to test that the identity will work is to run:

ssh -i IdentityFile -o Batchmode=yes root@host

ExcludeFile

A file listing pathnames to exclude from backups. The pathnames are relative to the directory being backed up. For example, to exclude the /tmp directory when backing up /, specify a pathname of tmp in the exclude file.

This file must also exist on remote systems in this location.