Backups and recovery
All hub state lives in one volume mounted at /app/data: the SQLite database and its write-ahead
log. Back up that volume and one secret, and you can rebuild the hub anywhere.
What the entrypoint does for you
Section titled “What the entrypoint does for you”On every startup the entrypoint snapshots the database into /app/data/backups/ before running
migrations, keeping the last five:
Directory/app/data
- app.db SQLite database
- app.db-wal write-ahead log
Directorybackups/ last 5 pre-migration snapshots
- …
These snapshots exist to recover from a migration failure — they are not a disaster-recovery backup, because they live inside the same volume. If the volume is lost, the snapshots go with it. Keep an off-box backup of the volume on whatever schedule fits your data.
The master key matters most
Section titled “The master key matters most”Restoring
Section titled “Restoring”-
Stop the stack so nothing is writing to the database.
-
Restore the volume or the database file from your off-box backup into
/app/data. -
Set the same
RUNAWAY_MASTER_KEYthe data was encrypted under. Without it the restored tokens stay unreadable. -
Start the stack again. The entrypoint runs migrations and serves the restored state.