weitere implementierung

This commit is contained in:
Hoang Nguyen
2026-05-06 11:19:18 +02:00
parent d8d4d1cbe9
commit aca2d6be33
18 changed files with 323 additions and 11 deletions

32
scripts/restore.sh Normal file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -e
MODE=$1
TIMESTAMP=$2
echo "🚀 Starting restore..."
if [ "$MODE" == "latest" ]; then
kubectl apply -f restore-latest.yaml
elif [ "$MODE" == "pitr" ]; then
if [ -z "$TIMESTAMP" ]; then
echo "❌ Please provide timestamp"
exit 1
fi
sed "s/TIMESTAMP/$TIMESTAMP/" restore-timestamp.yaml | kubectl apply -f -
elif [ "$MODE" == "test" ]; then
kubectl apply -f restore-test.yaml
else
echo "Usage:"
echo " ./restore.sh latest"
echo " ./restore.sh pitr '2026-05-06 02:30:00'"
echo " ./restore.sh test"
exit 1
fi
echo "✅ Restore triggered"