View on GitHub

rsync-backup

versatile rsync based backup scripts with minimal dependencies

Download this project as a .zip file Download this project as a tar.gz file

Backup configuration

The conf/backup-src-base file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source base directory to be used to augment the backup sources specified in the conf/backup-src-list configuration file if the conf/backup-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/backup-src-host file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source host to be used to augment the backup sources specified in the conf/backup-src-list configuration file if the conf/backup-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/backup-src-list file

A configuration file used by backup-sources(1) used by backup(1) containing the backup sources to be copied to a newly created backup directory when creating a new backup. The file must contain operand lines having any the following forms:

These operands will be passed to the backup-create(1) tool. Empty lines and comment lines (starting with a “#”) are allowed, too.

It is also possible to specify the backup source base directory in the conf/backup-src-base configuration file, to specify the backup source host in the conf/backup-src-host configuration file, to specify the backup source module in the conf/backup-src-module configuration file, to specify the backup source port in the conf/backup-src-port configuration file and to specify the backup source user in the conf/backup-src-user configuration file or to specify these in the conf/backup-src-prefix configuration file.

The conf/backup-src-list.d directory

An optional directory used by backup-sources(1) used by backup(1) containing configuration files similar to the conf/backup-src-list configuration file containing the backup sources to be copied to a newly created backup directory when creating a new backup. The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/backup-src-module file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source module to be used to augment the backup source host specified in the conf/backup-src-host configuration file and the backup sources specified in the conf/backup-src-list configuration file if the conf/backup-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/backup-src-port file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source port to be used to augment the backup source host specified in the conf/backup-src-host configuration file, the backup source module specified in the conf/backup-src-module configuration file and the backup sources specified in the conf/backup-src-list configuration file if the conf/backup-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/backup-src-prefix file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source prefix to be used to augment the backup sources specified in the conf/backup-src-list configuration file. The file must contain a line having one of the following forms:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/backup-src-user file

An optional configuration file used by backup-sources(1) used by backup(1) containing the backup source user to be used to augment the backup source host specified in the conf/backup-src-host configuration file and the backup sources specified in the conf/backup-src-list configuration file if the conf/backup-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/copy-config file

An optional configuration file used by backup-copy-rsync(1) used by backup-copy(1) used by backup-mirror-sources(1) used by backup-mirror(1) containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1) when copying a backup directory.

The conf/copy-config.d directory

An optional directory used by backup-copy-rsync(1) used by backup-copy(1) used by backup-mirror-sources(1) used by backup-mirror(1) containing configuration files similar to the conf/copy-config configuration file containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1) when copying a backup directory. The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/create-config file

An optional configuration file used by backup-create-rsync(1) used by backup-create(1) used by backup-sources(1) used by backup(1) containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1) when creating a new backup directory.

The conf/create-config.d directory

An optional directory used by backup-create-rsync(1) used by backup-create(1) used by backup-sources(1) used by backup(1) containing configuration files similar to the conf/create-config configuration file containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1) when creating a new backup directory. The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/dump-config file

An optional configuration file used by some conf/pre.d/*-dump scripts used by backup-prepare(1) used by backup(1) containing configuration variable assignments.

The conf/examples/ directory

A directory containing sample configuration files.

The conf/mirror-src-base file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source base directory to be used to augment the mirror sources specified in the conf/mirror-src-list configuration file if the conf/mirror-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/mirror-src-host file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source host to be used to augment the mirror sources specified in the conf/mirror-src-list configuration file if the conf/mirror-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/mirror-src-list file

A configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror sources to be copied to newly created backup directories when copying backup directories. The file must contain operand lines having any the following forms:

The operands specifying directories containing backup directories will be passed to the backup-rsync(1) tool. The backup directories within these directories as well as the operands specifying backup directories will be passed to the backup-copy(1) tool. Empty lines and comment lines (starting with a “#”) are allowed, too.

It is also possible to specify the mirror source base directory in the conf/mirror-src-base configuration file, to specify the mirror source host in the conf/mirror-src-host configuration file, to specify the mirror source module in the conf/mirror-src-module configuration file, to specify the mirror source port in the conf/mirror-src-port configuration file and to specify the mirror source user in the conf/mirror-src-user configuration file or to specify these in the conf/mirror-src-prefix configuration file.

The conf/mirror-src-list.d directory

An optional directory used by backup-mirror-sources(1) used by backup-mirror(1) containing configuration files similar to the conf/mirror-src-list configuration file containing the mirror sources to be copied to a newly created backup directory when copying backup directories. The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/mirror-src-module file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source module to be used to augment the mirror source host specified in the conf/mirror-src-host configuration file and the mirror sources specified in the conf/mirror-src-list configuration file if the conf/mirror-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/mirror-src-port file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source port to be used to augment the mirror source host specified in the conf/mirror-src-host configuration file, the mirror source module specified in the conf/mirror-src-module configuration file and the mirror sources specified in the conf/mirror-src-list configuration file if the conf/mirror-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/mirror-src-prefix file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source prefix to be used to augment the mirror sources specified in the conf/mirror-src-list configuration file. The file must contain a line having one of the following forms:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/mirror-src-user file

An optional configuration file used by backup-mirror-sources(1) used by backup-mirror(1) containing the mirror source user to be used to augment the mirror source host specified in the conf/mirror-src-host configuration file and the mirror sources specified in the conf/mirror-src-list configuration file if the conf/mirror-src-prefix configuration file does not exist. The file must contain a line having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too.

The conf/pre.d/ directory

An optional directory used by backup-prepare(1) used by backup(1) containing scripts which are executed in lexical order of names when preparing for backups. The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/purge-list file

An optional configuration file used by backup-purge(1) used by backup(1) and backup-mirror(1) containing patterns and ages which override the default ones. The file must contain operand lines having the following form:

Empty lines and comment lines (starting with a “#”) are allowed, too. Backup directories matching <PATTERN> are deleted if they are over <DAYS> days old.

Special patterns:

The conf/rsh file

An optional script to be used as a remote shell instead of the plain ssh(1). This script can be used for setting identity files and proxy commands, for instance.

The conf/rsync-config file

An optional configuration file used by backup-rsync(1) used by backup-copy-rsync(1) and backup-create-rsync(1) used by backup-copy(1) and backup-create(1) used by backup-mirror-sources(1) and backup-sources(1) used by backup(1) and backup-mirror(1) containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1).

The conf/rsync-config.d directory

An optional directory used by backup-rsync(1) used by backup-copy-rsync(1) and backup-create-rsync(1) used by backup-copy(1) and backup-create(1) used by backup-mirror-sources(1) and backup-sources(1) used by backup(1) and backup-mirror(1) containing configuration files similar to the conf/rsync-config configuration file containing long option names (without leading slashes) and optional option arguments to be passed to rsync(1). The names of the files must consist of only characters matching the pattern [[:alnum:]_.-].

The conf/tag-formats file

An optional configuration file used by backup-create(1) used by backup-sources(1) used by backup(1) containing date formats to be used when constructing a backup directory name for a new backup. Empty lines and comment lines (starting with a “#”) are allowed, too. Each date format is tried in turn in order specified until a non-existing backup directory is found.

Copyright (C) 2010 - 2024 Eero Häkkinen <Eero+rsync-backup@Häkkinen.fi>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.