feat: Introduce scripts for database backup, restore, and log viewing, replacing remote dashboard and studio scripts.

This commit is contained in:
syntaxbullet
2026-01-30 15:15:22 +01:00
parent 422db6479b
commit 1a3f5c6654
6 changed files with 160 additions and 74 deletions

38
shared/scripts/logs.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
# =============================================================================
# Aurora Log Viewer
# =============================================================================
# Usage: ./logs.sh [app|db|all] [-f]
# Default: app container, follow mode
# =============================================================================
SERVICE=${1:-app}
FOLLOW="-f"
if [[ "$1" == "-f" ]]; then
SERVICE="app"
FOLLOW="-f"
elif [[ "$2" == "-f" ]]; then
FOLLOW="-f"
elif [[ "$2" == "--no-follow" ]]; then
FOLLOW=""
fi
echo "📋 Fetching logs for service: $SERVICE..."
case $SERVICE in
app)
docker compose logs $FOLLOW app
;;
db)
docker compose logs $FOLLOW db
;;
all)
docker compose logs $FOLLOW
;;
*)
echo "Unknown service: $SERVICE"
echo "Usage: ./logs.sh [app|db|all] [-f]"
exit 1
;;
esac