restic: backup scripts should use absolute paths

This commit is contained in:
Jef Roosens 2024-01-11 10:44:11 +01:00
parent a6e4beefb3
commit 1afca6be94
Signed by: Jef Roosens
GPG key ID: 02D4C0997E74717B
3 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ snapshot_dir="${data_dir}.snapshot"
# Read-only snapshot for atomic backup
btrfs subvolume snapshot -r "$data_dir" "$snapshot_dir" || exit $?
restic backup "$snapshot_dir"
/usr/local/bin/restic backup "$snapshot_dir"
# Always remove snapshot subvolume, even if restic fails
btrfs subvolume delete "$snapshot_dir"