Vaultwarden Backup: What to Save and How to Check the Copy
A Vaultwarden backup is ready for a restore drill when the database, attachments and deployment settings are present in a dated copy you can open away from the server. Check the copy before you count it as a backup. Mark recovery as untested until a separate instance can sign in and download a known attachment.
What belongs in the backup
| Artifact | What to capture | When a missing file matters |
|---|---|---|
| Database | For SQLite, use Vaultwarden’s built-in backup or SQLite’s online backup command. For PostgreSQL or MySQL/MariaDB, use that database’s native logical dump. | A raw copy of a live SQLite main file can omit writes in the WAL. Use a consistent backup method instead of copying the main file alone. |
| Attachments and Sends | Copy the configured attachments directory separately. Include file-based Sends if they need to survive recovery. | A vault item can be present in the database while the file attached to it is missing. |
| Deployment and settings | Keep the image tag, Compose file, applicable environment and proxy configuration, persisted admin settings, and any relevant server keys such as the RSA key files. Record custom data paths. | A database and files alone may leave the operator guessing which version, hostname, mounts or settings to use. Protect settings and keys as secrets. |
| Independent copy | Encrypt a copy on another host or backup service. Keep the decryption material and the instructions accessible outside the vault being protected. | A backup that shares the server’s only disk or requires the failed vault to decrypt can be unreachable during an outage. |
Start with your running instance’s configuration so you know which paths and database actually apply. For a backup set that must represent one point in time, plan a window with writes paused while collecting the database and files, using the documented method for your backend. Record when each part was captured. Vaultwarden backup and restore documentation
Check the copy without starting a server
| Check | Pass evidence | If it fails |
|---|---|---|
| Retrieve and decrypt | Retrieve the off-host copy and open it from a separate workspace using credentials available independently. | Fix permissions, retention or access to the encryption key. Keep the last known usable copy. |
| Read the database copy | For an extracted standalone SQLite backup, run sqlite3 -readonly backup.sqlite3 "PRAGMA integrity_check;" and record ok. For a logical dump, use the backend-appropriate inspection and record what it checked. |
Capture a new consistent database copy. Structural integrity alone cannot establish that the snapshot is current or complete. |
| Match files to the set | A manifest records the instance, version, timestamps, file paths and hashes. Compare the downloaded artifacts to it. If you use a synthetic attachment, record its hash at creation and verify its bytes in the eventual restore. | Missing attachment directories, inconsistent timestamps or a mismatched hash require investigation before treating this set as usable. |
Example: suppose SQLite reports ok but the archive contains no attachments directory and you know the vault has attachments. Record “database readable, backup incomplete.” A checksum can prove that you retrieved the bytes you saved. It cannot prove the missing directory was ever saved.
Record recovery as a separate result
Restore the selected copy into an isolated instance using the documented procedure for its database and version. Keep the live service untouched and block test outbound email. Use a signed-out client and verify a known entry, the original bytes of a known attachment, and the expected permissions for a shared item where applicable. A login screen or a readable database earns no recovery pass on its own. Mark recovery as not run until these checks are complete. This guide provides proposed checks and a hypothetical example.
Container recreation tests whether data survives on the current host. See the Vaultwarden Docker Compose guide for that separate check.
Comments are closed.