Improved Plan B scripts.

This commit is contained in:
Christian P. MOMON 2023-03-16 19:55:10 +01:00
parent 04d853c8cc
commit 7e1c7246db
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
location:
source_directories:
- /var/backups/borg/mirrors/<HOSTNAME>
repositories:
- /var/backups/borg/<HOSTNAME>.repo
storage:
encryption_passcommand: 'cat /srv/borg/.borg-passphrase'
archive_name_format: '{now:%Y-%m-%dT%H:%M}'
borg_cache_directory: /var/backups/borg/mirrors/<HOSTNAME>.cache
retention:
!include /etc/borgmatic/retention.yaml
consistency:
checks:
- repository
- archives
prefix: '2' # This foo line is required with old borgmatic version.
output:
color: false
hooks:
before_backup:
- echo "== rsync starting…"
- /usr/bin/rsync -av -e ssh --update --delete --stats --delete-after --exclude '/dev/' --exclude '/proc/' --exclude '/sys/' root@<HOSTNAME>:/ /var/backups/borg/mirrors/<HOSTNAME>/
- echo "== rsync done."