Initial commit
This commit is contained in:
commit
420be44f56
11 changed files with 432 additions and 0 deletions
22
templates/backup-standalone.j2
Executable file
22
templates/backup-standalone.j2
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
test -f "/etc/backup-client/enabled" || { echo "Standalone backup is disabled"; exit 0; }
|
||||
|
||||
{% if backup_backend == 'restic' %}
|
||||
# restic backend
|
||||
source /etc/backup-client/restic.env
|
||||
|
||||
restic backup \
|
||||
--verbose \
|
||||
--exclude-caches \
|
||||
--one-file-system \
|
||||
--exclude "${RESTIC_REPOSITORY}" \
|
||||
--exclude-file "/etc/backup-client/exclude_files" \
|
||||
--files-from "/etc/backup-client/include_files"
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if not backup_backend %}
|
||||
echo "Noop, backup is handled external"
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue