Add the ability to exclude certain paths from backup
This commit is contained in:
@ -17,7 +17,7 @@ mkdir -p "$RESTIC_LOG_DIR"
|
||||
# Run backup, and capture logs to file
|
||||
cron_backup() {
|
||||
curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_healthchecks_id }}/start
|
||||
restic --verbose backup {{ restic_backup_locations|join(' ') }} | tee -a $RESTIC_LOG_FILE
|
||||
restic --verbose backup --files-from=$HOME/restic-include.txt --exclude-file=$HOME/restic-excludes.txt | tee -a $RESTIC_LOG_FILE
|
||||
exit_code=${PIPESTATUS[0]}
|
||||
curl -fsS -m 10 --retry 5 -o /dev/null {{ healthchecks_host }}/{{ restic_healthchecks_id }}/$exit_code --data-binary "@$RESTIC_LOG_FILE"
|
||||
echo "Exit code: $exit_code"
|
||||
@ -25,7 +25,7 @@ cron_backup() {
|
||||
|
||||
# Run backup, but show all the progress
|
||||
backup() {
|
||||
restic --verbose backup {{ restic_backup_locations|join(' ') }}
|
||||
restic --verbose backup --files-from=$HOME/restic-include.txt --exclude-file=$HOME/restic-excludes.txt
|
||||
}
|
||||
|
||||
{% if restic_forget %}
|
||||
|
Reference in New Issue
Block a user