fix production issues
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 51s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 51s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
# Validates that a backup directory contains the artifacts required for restore evidence.
|
||||
# Usage: bash scripts/backup-restore-smoke-check.sh backups/rentaldrivego-prod-<timestamp>
|
||||
set -euo pipefail
|
||||
|
||||
BACKUP_DIR="${1:-}"
|
||||
if [[ -z "${BACKUP_DIR}" || ! -d "${BACKUP_DIR}" ]]; then
|
||||
echo "Usage: $0 <backup-directory>" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
required=(
|
||||
"postgres.dump"
|
||||
"manifest.txt"
|
||||
)
|
||||
|
||||
missing=0
|
||||
for file in "${required[@]}"; do
|
||||
if [[ ! -f "${BACKUP_DIR}/${file}" ]]; then
|
||||
echo "MISSING: ${file}"
|
||||
missing=1
|
||||
else
|
||||
echo "OK: ${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Uploads archive is strongly recommended for full RPO evidence.
|
||||
if [[ -f "${BACKUP_DIR}/api-uploads.tar.gz" ]]; then
|
||||
echo "OK: api-uploads.tar.gz"
|
||||
else
|
||||
echo "WARN: api-uploads.tar.gz missing (object/file restore evidence incomplete)"
|
||||
fi
|
||||
|
||||
if [[ ! -s "${BACKUP_DIR}/manifest.txt" ]]; then
|
||||
echo "MISSING: manifest.txt is empty"
|
||||
missing=1
|
||||
else
|
||||
echo "---- manifest ----"
|
||||
cat "${BACKUP_DIR}/manifest.txt"
|
||||
fi
|
||||
|
||||
if [[ "${missing}" -ne 0 ]]; then
|
||||
echo "Backup smoke check FAILED"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Backup smoke check PASSED"
|
||||
echo "Record RPO/RTO evidence: restore this directory with scripts/docker-prod-restore.sh and time the exercise."
|
||||
Reference in New Issue
Block a user