ops: add verified PostgreSQL backups
CI / test (push) Successful in 10s

This commit is contained in:
m
2026-08-16 17:53:40 +03:00
parent 6303dfe6eb
commit e9594306e5
8 changed files with 271 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
backup_root="${ASSISTANT_BACKUP_DIR:-/home/m/assistant-backups/postgres}"
verify_script="${ASSISTANT_RESTORE_VERIFY_SCRIPT:-/home/m/assistant-ops/verify-postgres-restore.sh}"
latest="$(find "$backup_root" -mindepth 1 -maxdepth 1 -type d ! -name '.*' -printf '%f\n' | sort | tail -n 1)"
if [ -z "$latest" ]; then
echo "No completed PostgreSQL backup found in $backup_root" >&2
exit 1
fi
exec "$verify_script" "$backup_root/$latest"