use more variables instead of hard-coding (fixes #3)
This commit is contained in:
parent
d48064a7e3
commit
04686de59c
15 changed files with 101 additions and 70 deletions
|
|
@ -4,10 +4,9 @@
|
|||
# pass -v --stats to show more information
|
||||
# pass --list --filter AME to show all fiels Added Modified or with Error
|
||||
|
||||
#export BORG_RSH='ssh -i /home/jannik/.ssh/id_rsa'
|
||||
export BORG_RSH='ssh -i /home/jannik/.ssh/id_ed25519'
|
||||
export BORG_PASSPHRASE='borgbackup.{{ borgbackup_host }}@hetznerbx'
|
||||
export BORG_REPO='ssh://u182062-sub{{ borgbackup_sub }}@u182062.your-storagebox.de:23/./borg'
|
||||
export BORG_RSH='ssh -i {{ borgbackup_ssh_id }}'
|
||||
export BORG_PASSPHRASE='{{ borgbackup_passphrase }}'
|
||||
export BORG_REPO='{{ borgbackup_repo }}'
|
||||
|
||||
# some helpers and error handling:
|
||||
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
|
||||
|
|
@ -33,7 +32,7 @@ borg create \
|
|||
--exclude '/var/lib/lxcfs' \
|
||||
--exclude '/var/log/*' \
|
||||
\
|
||||
$BORG_REPO::'{{ borgbackup_host }}-{now:%Y%m%d_%H%M}' \
|
||||
$BORG_REPO::'{{ borgbackup_hostname }}-{now:%Y%m%d_%H%M}' \
|
||||
/etc \
|
||||
/var \
|
||||
/root \
|
||||
|
|
@ -44,7 +43,7 @@ backup_exit=$?
|
|||
|
||||
# Prune old backups: keep 7 daily, 3 weekly and 2 monthly (3 months total)
|
||||
borg prune \
|
||||
--prefix '{{ borgbackup_host }}-' \
|
||||
--prefix '{{ borgbackup_hostname }}-' \
|
||||
--keep-daily 7 \
|
||||
--keep-weekly 3 \
|
||||
--keep-monthly 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue