Add borg backup role

This commit is contained in:
Daniel A. Maierhofer
2018-07-28 19:05:46 +02:00
parent ba40616ab2
commit 99ee7f23aa
33 changed files with 1042 additions and 137 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/sh
set -e
export BORG_RSH="ssh -i {{ borgbackup_client_ssh_key_file }}"
export BORG_PASSPHRASE="{{ borgbackup_passphrase }}"
REPOSITORY={{ borgbackup_server_user }}@{{ borgbackup_client_backup_server_lanfreebackup | default(borgbackup_client_backup_server) }}:{{ item.name }}
{{ borgbackup_binary }} check --show-rc --verbose \
{{ item.check_options }} \
$REPOSITORY \
2>&1 | tee {{ borgbackup_client_lastlog_dir }}/{{ item.name }}_{{ check_suffix_script_filename }}.lastlog \
| /usr/bin/logger -t borgbackup_check_{{ item.name }}_{{ borgbackup_client_backup_server }}