I’m asking what is the most efficient way to backup the vault.
I have Vaultwarden installed and running as a Docker container.
I used this YML file:
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
DOMAIN: "https://185.236.152"
volumes:
- ./vw_data:/data
In the folder where is the YML file, the one used to launch the container, I found the folder ~/Vaultwarden/vw_data and inside there are the files as described here: Backing up your vault · dani-garcia/vaultwarden Wiki · GitHub, like this:
data
├── attachments # Each attachment is stored as a separate file under this dir.
│ └── <uuid> # (The attachments dir won't be present if no attachments have been created.)
│ └── <random_id>
├── config.json # Stores admin page config; only exists if the admin page has been enabled before.
├── db.sqlite3 # Main SQLite database file.
├── db.sqlite3-shm # SQLite shared memory file (not always present).
├── db.sqlite3-wal # SQLite write-ahead log file (not always present).
├── rsa_key.pem
├── tmp
└── sends # Each Send attachment is stored as a separate file under this dir.
└── <uuid> # (The sends dir won't be present if no Send attachments have been created.)
└── <random_id>
So I think that the data are all stored in these files.
I tried to upload something like 100 passwords and all the files and folder are in total 6MB. I tried to export all the vault as encrypted json file and it is only 700kB.
I have the following questions:
- Are all the data in the DB encrypted? I tried to open the file db.sqlite3 but I don’t have it installed to check the content but maybe I cannot do this check by myself anyway. If someone get this file, can she/he get the saved passwords? How to make this check?
- According to the wiki reported in the indicated link of above, if I copy all the folder I should have everything for the back up. Is it correct or am I wrong? If it’s true why install other apps (more than 6MB) to backup this full folder
- What about backup (copy and paste somewhere else) the only file db.sqlite3? I’ve not understood this from the wiki. If I lose everything, and I have a copy of the file db.sqlite3, can just paste the db.sqlite3 file to have everything as it was before losing everything? I mean the copy, not the backup using the command (‘sqlite3 ./data/db.sqlite3 “.backup /path/to/backup/snap_vaultwarden.sqlite3”’), that requires installing sqlite3
Anyway, the export of all the vault in json is only 700kB, so I’m still thinking how to automatize this export but it seems there is no this feature yet.
Let me know if some of my assumptions are wrong and how to check them.
Thanks