Log mounted filesystems for backup job guards

This commit is contained in:
2026-10-25 07:10:01 +01:00
parent ca02186ad1
commit aa52baa3e7
4 changed files with 14 additions and 5 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ data:
backup.sh: |
#!/bin/sh
set -eu
test "$(stat -f -c %T /backup)" = bcachefs
backup_fs=$(stat -f -c %T /backup)
echo "Backup filesystem: $backup_fs"
test "$backup_fs" = bcachefs
case "$BACKUP_TARGET" in *[!a-zA-Z0-9_-]*|'') echo "Invalid backup target" >&2; exit 1 ;; esac
PGUSER="${PGUSER:-postgres}"
PGDATABASE="${PGDATABASE:-postgres}"