Migrating data to non-Cloudron environment
-
If I were to migrate my Vaultwarden to a different (non-Cloudron) docker environment. Could I just copy the contents of it's appdata/xxx-app-id-xxx/data folder into the the new data folder of the new container?
-
@panthrosrevenge The data directory is "complete" and has all the data you will need to migrate. But it's quite unlikely that copying things over to another docker image will work. Each docker image is built differently and you have to inspect the the docker image you plan to use and figure out how it expects the data to be laid out.
As for cloudron's docker image, you can inspect it here - https://git.cloudron.io/cloudron/vaultwarden-app/
-
@panthrosrevenge
Another option would be to export the data and import it with the new installation. -
@BrutalBirdie +1 that's what I'd do.
-
I'm currently doing the opposite (migrating data from non-Cloudron to Cloudron environment) but I assume it's similar in ways @girish described so just wanted to mention some caveats for people trying this:
-
It's not possible (or at least not trivially possible) to migrate your users. The Vaultwarden docker image uses sqlite while Cloudron uses mysql. The org that I'm trying to migrate has less than 30 users so I'm ok with having to re-invite everyone to the new instance. But if you're trying to migrate a bigger Vaultwarden installation, you'll either have to figure out how to transfer the users between mysql and the sqlite database, or everyone has to create a new account.
-
File attachments have to be copied manually. You can't just
scp
theattachments
folder from one server to the other, this means every attachment has to be downloaded manually through the gui and then uploaded again to the new instance.
Exporting and importing the vault itself was a matter of exporting a
json
file and then importing it in the new vault. Took less than 5 min. -