Operator: backup and restore drill
Verify a consistent backup using a new destination and separate server.
Operator-only prerequisites: the dedicated save from Isolated restart, its matching source build, filesystem space and another unused destination. Use the backup tool’s SQLite backup API; do not copy only a live database’s main file while its WAL is active.
Every filename in this example belongs to the rehearsal. Restoring a production save requires its own planned service stop and retained recovery copy.
Step by step
Tick a step after observing the expected result. Saved on this device only.
01Record the rehearsal baseline
In the isolated account note character identity, completed activities and inventory totals. Make no new commitments during the comparison window.
You have a concrete visible baseline without publishing a player database or private contents.
02Create a new consistent backup
Run .venv/bin/python tools/manage.py backup runtime/qa-restart-01.sqlite3 backups/qa-restore-01.sqlite3
The destination must be unused. The tool creates a consistent copy and reports its digest and ledger audit.
03Verify the backup before opening it
Run .venv/bin/python tools/manage.py audit backups/qa-restore-01.sqlite3 and .venv/bin/python tools_patch/check_save.py --db backups/qa-restore-01.sqlite3
Accounting and compatibility pass against the matching source version.
04Keep the first server and save safe
Stop the isolated original server cleanly. Preserve the original rehearsal database and any sidecars together. Make another new working copy with the backup tool if the verified backup must remain immutable.
The original state and verified backup remain available for comparison and recovery.
05Open the restored working copy
Launch run_floor.py against the restored working-copy path on an unused loopback port with --clock real --no-browser. Sign in using the original test account.
The restored account, identity and inventory agree with the backup baseline; elapsed-time catch-up is recorded as such.
06Repeat the ledger check
Stop the restored test server and audit its database. Record the backup digest, source version, restore commands and observed differences without publishing credentials or saves.
The drill proves this backup can open and settle correctly. It does not by itself prove that copies exist outside the host or that a disaster-recovery target has been met.