Last active
July 18, 2020 01:25
-
-
Save winny-/daa9bdf5803017ae36bd418def2c603d to your computer and use it in GitHub Desktop.
a wrapper script & config file for borgmatic backups of a gentoo host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -e /root/inhibit-backup ]; then | |
f= | |
[ -t 2 ] && f='-s' | |
logger $f "$0: /root/inhibit-backup exists, skipping backup" | |
exit | |
fi | |
/usr/bin/borgmatic -c /etc/borgmatic/snowcrash.yaml "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location: | |
source_directories: | |
- /home | |
- /etc | |
- /var/db/pkg | |
- /var/log | |
- /var/spool | |
- /var/lib/portage | |
- /root | |
repositories: | |
- [email protected]:repository.borg | |
one_file_system: true | |
retention: | |
keep_daily: 7 | |
keep_weekly: 4 | |
keep_monthly: 6 | |
consistency: | |
checks: | |
- repository | |
- archives | |
storage: | |
ssh_command: ssh -i /etc/borgmatic/keys/snowcrash/ssh | |
encryption_passcommand: cat /etc/borgmatic/keys/snowcrash/repokey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment