feat(backup): manual-snapshot CLI + host-side backup.sh and restore.sh (safe restore)

This commit is contained in:
Jannis Braun
2026-06-20 02:34:30 +02:00
parent 9407e48293
commit 70da1ede64
3 changed files with 77 additions and 0 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Trigger a manual DB snapshot inside the running Backspace container.
set -euo pipefail
cd "$(dirname "$0")"
if ! docker ps --format '{{.Names}}' | grep -q '^backspace$'; then
echo "Error: backspace container is not running." >&2
exit 1
fi
docker exec -w /app/packages/server backspace \
node --import tsx/esm src/scripts/snapshot.ts