Add host-specific variables for backup dirs and options.
This commit is contained in:
parent
8a821f501d
commit
23766673be
4 changed files with 9 additions and 2 deletions
|
@ -17,6 +17,7 @@
|
|||
- notes
|
||||
backup_opts: "--exclude-caches -e '*/updater-*/' -e '*/preview/*' -e '*/files_trashbin/*'"
|
||||
backup_dirs:
|
||||
- "/etc"
|
||||
- "{{ nc_dir }}"
|
||||
- "{{ data_dir }}"
|
||||
ansible_python_interpreter: "/usr/bin/python3"
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
allow_download: True
|
||||
backup_dirs_extra:
|
||||
- /home
|
||||
backup_opts_extra: ""
|
||||
|
|
|
@ -5,4 +5,7 @@ borg_key_backup: "/root/borg-key.backup"
|
|||
## alternative: "ssh://user@host:port/path/to/repo"
|
||||
backup_repo: "/var/backups/mnt/backup/borg"
|
||||
|
||||
backup_dirs_extra: ""
|
||||
|
||||
backup_opts: "--exclude-caches"
|
||||
backup_opts_extra: ""
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
set -eu
|
||||
|
||||
REPOSITORY="{{ backup_repo }}"
|
||||
BACKUP=({{ backup_dirs|join(' ') }})
|
||||
EXTRAOPTIONS=({{ backup_opts }})
|
||||
BACKUP=({{ backup_dirs|join(' ') }} {{ backup_dirs_extra|join(' ') }})
|
||||
EXTRAOPTIONS=({{ backup_opts }} {{ backup_opts_extra }})
|
||||
export BORG_PASSCOMMAND="cat {{ borg_pwd_file }}"
|
||||
MOUNTED=""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue