debops.backup2l default variables¶
Sections
APT packages¶
-
backup2l__base_packages
¶
List of required APT packages to install.
backup2l__base_packages: [ 'backup2l' ]
-
backup2l__packages
¶
List of additional APT packages to install with backup2l.
backup2l__packages: []
Directory and file paths¶
-
backup2l__backup_dev
¶
Optional, absolute path of a mount point which will be automatically mounted
and unmounted by the backup2l script. This needs to be configured
beforehand in the /etc/fstab
file.
backup2l__backup_dev: ''
-
backup2l__backup_dir
¶
Absolute path to the directory where backup2l script maintains backups. This path will be excluded from the backups.
backup2l__backup_dir: '{{ (ansible_local.fhs.backup | d("/var/backups"))
+ "/backup2l" }}'
-
backup2l__pre_hook_dir
¶
Absolute path to a directory with scripts executed by the run-parts command before backups are performed.
backup2l__pre_hook_dir: '{{ (ansible_local.fhs.etc | d("/usr/local/etc"))
+ "/backup/pre-hook.d" }}'
-
backup2l__post_hook_dir
¶
Absolute path to a directory with scripts executed by the run-parts command after backups are finished.
backup2l__post_hook_dir: '{{ (ansible_local.fhs.etc | d("/usr/local/etc"))
+ "/backup/post-hook.d" }}'
-
backup2l__include_file
¶
Absolute path to a text file which contains a list of paths to include in a backup, one per line. This file can be modified by other software to include additional paths.
backup2l__include_file: '{{ (ansible_local.fhs.etc | d("/usr/local/etc"))
+ "/backup/include" }}'
Directories and files to archive¶
These lists define absolute paths of directories and files to include in the backup2l archive.
-
backup2l__default_include
¶
Default list of directories to backup, defined by the role.
backup2l__default_include:
- '/etc'
- '/home'
- '/opt'
- '/root'
- '/srv'
- '/usr/local'
- '/var/backups'
- '/var/local'
- '/var/mail'
- '/var/spool/cron'
-
backup2l__include
¶
List of directories to backup defined on all hosts in the Ansible inventory.
backup2l__include: []
-
backup2l__group_include
¶
List of directories to backup defined on hosts in a specific Ansible inventory group.
backup2l__group_include: []
-
backup2l__host_include
¶
List of directories to backup defined on specific hosts in the Ansible inventory.
backup2l__host_include: []
-
backup2l__srclist_from_file
¶
Boolean. If True
, the backup2l script will read the list of
paths to archive from an external file. If False
, the script will use
a static list of paths defined in its configuration file.
backup2l__srclist_from_file: True
-
backup2l__srclist
¶
List of paths to archive saved in the configuration file.
backup2l__srclist: '{{ (backup2l__default_include
+ backup2l__include
+ backup2l__group_include
+ backup2l__host_include)
| join(" ") }}'
Exclude patterns¶
These lists define the arguments passed to the find command, which can be used to exclude certain files or directories from the archive. See find(1) for specific details about available patterns.
-
backup2l__default_exclude
¶
List of default exclusion patterns defined by the role.
backup2l__default_exclude:
- '-wholename "{{ backup2l__backup_dir }}" -prune'
- '-path "*.ansible/tmp*"'
- '-path "*.cache*"'
- '-path "*.nobackup*"'
- '-name "*.o"'
- '-name "*.pyc"'
-
backup2l__exclude
¶
List of exclusion patterns defined on all hosts in the Ansible inventory.
backup2l__exclude: []
-
backup2l__group_exclude
¶
List of exclusion patterns defined on hosts in a specific Ansible inventory group.
backup2l__group_exclude: []
-
backup2l__host_exclude
¶
List of exclusion patterns defined on specific hosts in the Ansible inventory.
backup2l__host_exclude: []
-
backup2l__skipcond
¶
List of exclude patterns saved in the configuration file.
backup2l__skipcond: '{{ (backup2l__default_exclude
+ backup2l__exclude
+ backup2l__group_exclude
+ backup2l__host_exclude)
| join(" -o ") }}'
Other configuration options¶
-
backup2l__volname
¶
Prefix used by all files managed by this backup2l script instance.
backup2l__volname: 'all'
-
backup2l__max_level
¶
Number of levels of differential backups (1..9).
backup2l__max_level: '3'
-
backup2l__max_per_level
¶
Maximum number of differential backups per level (1..9).
backup2l__max_per_level: '8'
-
backup2l__max_full
¶
Maximum number of full backups (1..8).
backup2l__max_full: '2'
-
backup2l__generations
¶
For differential backups: number of generations to keep per level; old backups are removed such that at least GENERATIONS * MAX_PER_LEVEL recent versions are still available for the respective level.
backup2l__generations: '1'
-
backup2l__create_check_file
¶
When enabled, a check file is automatically generated.
backup2l__create_check_file: True
-
backup2l__autorun
¶
When enabled, backup2l script will create a backup automatically without any arguments needed.
backup2l__autorun: False
-
backup2l__size_units
¶
Size units used in the backup2l script output. Set to B
,
K
, M
or G
to have unified units in the generated summary.
backup2l__size_units: ''
-
backup2l__timezone
¶
Specfy the timezone used for metadata. The default value is recommended.
backup2l__timezone: 'UTC'
-
backup2l__create_driver
¶
Archive driver for new backups.
backup2l__create_driver: 'DRIVER_TAR_GZ_RSYNCABLE'