2 months ago
Hello, I need to create a safe SQLite online backup from a running Railway service with a persistent Volume.
Setup:
- Node.js service
- Persistent Volume mounted at /data
- Live SQLite database: /data/travelcalc.db
- SQLite WAL mode is active
- travelcalc.db-wal and travelcalc.db-shm currently exist
I need to create a transactionally consistent backup of this live SQLite database without restarting, redeploying, detaching, or modifying the Volume.
The Railway CLI SSH connection asks me to trust the host key for ssh.railway.com, but I cannot find an official Railway-published host-key fingerprint that I can independently verify.
For security reasons, I do not want to bypass SSH host verification or use StrictHostKeyChecking=no.
I can already access the Volume using:
railway volume files list /
and I confirmed that travelcalc.db, travelcalc.db-wal, and travelcalc.db-shm exist.
However, I do not want to download those files separately because I cannot confirm that Railway guarantees a consistent point-in-time snapshot across those files while SQLite is actively running.
Could Railway please clarify:
-
Is there an official/verifiable method to verify the SSH host key for ssh.railway.com?
-
Is there an officially supported way to execute a one-time command inside the currently running deployment without SSH?
-
What is Railway's recommended method for creating and downloading a transactionally consistent backup of a live SQLite database running in WAL mode on a Railway Volume?
-
Do Railway Volume Backups guarantee a SQLite/WAL-consistent point-in-time snapshot while the database is actively being written to?
My goal is simply to create a safe off-platform backup without changing the production database.
Thank you.
2 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
Hey — for a live WAL SQLite on a volume, published docs support an app-side consistent copy; they leave host-key pinning and “volume snapshot = WAL-consistent” open.
1) ssh.railway.com host key
railway ssh uses your system SSH client to ssh.railway.com with a registered key (railway ssh). Docs do not publish an official host-key fingerprint. Treat that as unpublished — don’t use StrictHostKeyChecking=no; ask staff for a published fingerprint if you need TOFU-free verify.
2) One-shot without SSH?
Published remote exec into the running deployment is railway ssh / railway ssh -- <cmd> (CLI ssh). There is no separate documented non-SSH “run one command in the current deployment” path. railway volume files / browse manage the volume filesystem, not process exec (Volumes, CLI volume).
3) WAL-consistent backup (docs path)
Downloading travelcalc.db + -wal + -shm separately while writers are active is not documented as a transactional snapshot — your caution matches the docs gap.
Use SQLite’s own online backup inside the running service (or a one-shot that opens the DB via SQLite APIs): Online Backup API, VACUUM INTO, or shell .backup. Then pull the single backup file with railway volume files download / railway volume browse (Volumes, CLI volume), or railway ssh -- … only if you accept SSH host verification. No restart/detach required.
4) Volume Backups vs WAL consistency
Volume Backups cover volume contents (including SQLite files) for recovery (Volume backups) but do not document SQLite/WAL transactional consistency under active writers. Prefer the SQLite online-backup path for a trusted off-platform logical backup; treat Volume Backups as volume-level DR, not a documented WAL-consistent export.
Until Railway publishes an ssh.railway.com fingerprint or a WAL-consistency note for volume snapshots, both stay undocumented.
2 months ago
- Railway do not currently publish official SSH host key fingerprint, so no
- You can directly run command in the Service Console via Dashboard
- You can run
VACUUM INTO '/data/backup.db'and download it directly inside the Files tab in the Service Console or use the CLI - There is no official guarantee, but in my testing, restored backup of WAL files were complete to the moment of the backup