Add borg backup role
This commit is contained in:
14
roles/borg_client/templates/check_job.sh.j2
Normal file
14
roles/borg_client/templates/check_job.sh.j2
Normal 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 }}
|
||||
Reference in New Issue
Block a user