Created
July 16, 2019 17:49
-
-
Save sergejx/b6527a1a4bb46d43616b6a2ad6137586 to your computer and use it in GitHub Desktop.
Backup using Restic
This file contains 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 | |
export RESTIC_REPOSITORY=rest:http://************ | |
export RESTIC_PASSWORD='*************' | |
EXCLUDES=/home/sergej/.duplicity-exclude | |
case "$1" in | |
"") | |
restic backup /home --exclude-file $EXCLUDES | |
;; | |
clean) | |
restic forget --prune --keep-last 3 --keep-weekly 10 --keep-monthly 12 | |
;; | |
*) | |
restic $@ | |
esac | |
unset -v RESTIC_REPOSITORY RESTIC_PASSWORD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment