weitere implementierung
This commit is contained in:
32
scripts/restore.sh
Normal file
32
scripts/restore.sh
Normal 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"
|
||||
Reference in New Issue
Block a user