Use this guide to protect and recover the mutable backend state for the production Socket.io service.
The provided backup flow captures the key mutable server data:
leaderboards.jsonrpg_database.jsonmaps/characters/achievement_profiles/emulator_states/
Run on the server:
cd /opt/bobsgameweb/server/ops
bash backup-backend-data.shThis creates a timestamped archive under:
/opt/bobsgameweb/backups/
Run locally:
BACKEND_HOST=ws.bobsgame.com BACKEND_USER=root ./scripts/fetch-backend-backup.shOptional local destination:
BACKEND_HOST=ws.bobsgame.com BACKEND_USER=root LOCAL_BACKUP_DIR=./backups ./scripts/fetch-backend-backup.shsudo systemctl stop bobsgameweb-serverExample:
cd /opt/bobsgameweb/server
tar -xzf /opt/bobsgameweb/backups/YOUR_BACKUP_FILE.tar.gzsudo systemctl start bobsgameweb-server
sudo systemctl status bobsgameweb-server --no-pagerBACKEND_URL=https://ws.bobsgame.com ./scripts/check-backend-host.sh- take a backup before major backend changes
- take a backup before first production cutover
- take a backup before schema/storage changes
- keep at least one known-good off-server copy
- periodically prune old on-server backups so disk usage stays predictable
A prune helper is included:
server/ops/prune-backups.sh
Example:
KEEP_COUNT=10 bash prune-backups.shBACKEND_RECOVERY.mdPOST_DEPLOY_CHECKLIST.mdHARDENING_CHECKLIST.md