Skip to content

Configuration

Sebastian Schlicht edited this page Jul 12, 2020 · 4 revisions

NB supports three types of configuration files:

Configuration File Description Default Location
NB configuration backup location ~/.nb/config
mapping file map local paths to backup destinations ~/.nb/mapping
inclusion/exclusion files include/exclude files ~/.nb/include, ~/.nb/exclude

The scheduled runs of NB expect the configuration files to be placed at their default locations.

Power Users: Alternating paths can be passed in manual runs or the anacrontab using the respective command line options.

NB Configuration

The NB configuration is the main configuration file. It allows to specify the backup locations and how to connect.

The following table lists all options that are available.

Option Description
BACKUP_LOCATION path to the backup destination; this can be a local path or the path on the remote machine, if specified
REMOTE_HOST remote machine to store the backup to (omit for a local backup)
REMOTE_USER user on the remote machine to login as (omit for a local backup)

Mapping File

Each line in the mapping file maps a local directory to its local or remote backup destination. The backup destination can either be relative (to the backup location) or an absolute path.

Refer to the following examples as guidance:

# backup local directory to `all-images` folder inside backup location
/data/images/ all-images
# backup local directory to folder outside of the backup location
/data/videos/ /mnt/nas/primary/backup/all/videos

Inclusion File

The inclusion file allows to include file in the backup that would have normally been excluded, e.g. hidden files. Each line in the file represents a file path pattern, matching files will be included in the backup. The specified inclusion file is applied to each mapping configured.

This is a built-in feature of rsync. See man rsync for details.

Exclusion File

The exclusion file allows to exclude files from the backup. Each line in the file represents a file path pattern, matching files will be excluded from the backup. The specified exclusion file is applied to each mapping configured.

This is a built-in feature of rsync. See man rsync for details.

Clone this wiki locally