Vaultwarden backup and restore
Capture a safe SQLite snapshot plus the attachments, Sends and settings not contained in the database.
Last updated
On this page (5)
Vaultwarden ยท Backup and restore
Before you start
- Vaultwarden with SQLite backend.
- SQLite CLI and access to the mounted data directory.
- Encrypted backup storage and isolated recovery instance.
Procedure
- Hold writes while capturing the files and run
sqlite3 data/db.sqlite3 ".backup 'vaultwarden.sqlite3'"to produce a consistent standalone database snapshot; do not use a raw copy of the running main file. - Copy
attachments/,sends/,config.jsonandrsa_key*where present, and save the deployment environment separately. Treat backups and signing keys as sensitive. - With the test app stopped and a new data directory (no prior WAL/SHM files), put the snapshot at
db.sqlite3and restore sibling paths. Set permissions, update test endpoints and start Vaultwarden.
Verify the result
- Run
sqlite3 vaultwarden.sqlite3 'PRAGMA integrity_check;'on the backup copy and expectok. - Use a designated test account to unlock a restored vault and retrieve a known attachment or file Send.
