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
@@ -7,7 +7,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
test -d /backup/kubernetes/postgresql/arschrock
test "$(stat -c %u /backup/kubernetes/postgresql/arschrock)" = 962
test -S /postgresql/.s.PGSQL.5432
+5 -2
View File
@@ -6,8 +6,11 @@ data:
backup.sh: |
#!/bin/sh
set -eu
test "$(stat -f -c %T /backup)" = bcachefs
test "$(stat -f -c %T /source)" = ceph
backup_fs=$(stat -f -c %T /backup)
source_fs=$(stat -f -c %T /source)
echo "Backup filesystem: $backup_fs; source filesystem: $source_fs"
test "$backup_fs" = bcachefs
test "$source_fs" = ceph
test -d /source
rsync --archive --numeric-ids --inplace --partial --delete --human-readable --stats /source/ /backup/
echo "Completed CephFS mirror for $BACKUP_TARGET"
+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}"
+3 -1
View File
@@ -20,7 +20,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
endpoint=http://rook-ceph-rgw-my-store.rook-ceph.svc:80
failures=0
while read -r bucket owner; do