Files
homelab-infra/ops/restore-tests/run-restore-checks.sh
T
Micha a244f2d677 feat(restore): komodo mongo data restore test
Neuer Test: mongorestore von komodo-mongo.archive.gz in eine frische
Wegwerf-Mongo. Beweist, dass die Stack-Definitionen und damit die
KOMODO_*-Stack-ENV-Werte aus dem Dump rekonstruiert werden koennen
(kanonische Quelle laut docs/DISASTER_RECOVERY.md 6.2.1).

Machbarkeit vorab verifiziert: Dump 6.0M auf Host vorhanden,
mongorestore im mongo:7.0.32-Image verfuegbar, shfs-Write funktioniert.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 11:18:39 +02:00

66 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
MODE="${1:-}"
WHATIF="${2:-}"
case "$MODE" in
freshness)
exec "$SCRIPT_DIR/check-restore-freshness.sh"
;;
vaultwarden)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/vaultwarden-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/vaultwarden-restore-test.sh"
;;
gitea)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/gitea-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/gitea-restore-test.sh"
;;
paperless)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/paperless-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/paperless-restore-test.sh"
;;
immich)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/immich-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/immich-restore-test.sh"
;;
authelia)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/authelia-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/authelia-restore-test.sh"
;;
nextcloud)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/nextcloud-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/nextcloud-restore-test.sh"
;;
komodo-bootstrap)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/komodo-bootstrap-test.sh" --what-if
fi
exec "$SCRIPT_DIR/komodo-bootstrap-test.sh"
;;
komodo-mongo-restore)
if [ "$WHATIF" = "--what-if" ]; then
exec "$SCRIPT_DIR/komodo-mongo-restore-test.sh" --what-if
fi
exec "$SCRIPT_DIR/komodo-mongo-restore-test.sh"
;;
*)
echo "Usage: $0 {freshness|vaultwarden|gitea|paperless|immich|authelia|nextcloud|komodo-bootstrap|komodo-mongo-restore} [--what-if]" >&2
exit 1
;;
esac