mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #598] How to migrate sqlite3 database to Bitwarden_rs/mysql database #399
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#399
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BobWs on GitHub (Sep 2, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/598
Hi,
Thanks for the mysql implementation! At the moment I'm testing this image. I've successfully installed it on Synology docker with mariadb. So far so good.
But how to migrate my current database sqlite3 to mysql database while maintaining all users and all attachments and organizations.
I just tried to export the current bitwarden vault (json file). And I imported it in the new vault (mysql version) and this went well, only the attachments didn't come along. And I also miss the organizations.
Can someone tell you how to do this via a step-by-step plan? Is it possible to do this via phpadmin? For example, that you import the sqlite3 into the bitwarden database?
@mprasil commented on GitHub (Sep 4, 2019):
Well between discussion under #497 and in our matrix room, there is no bulletproof way to migrate directly the DB. The only "officially" supported way is export/import via vault, but you have to do this for every user and organization and attachments won't be moved over as you noticed.
Unless someone steps up and writes a tool to migrate the DB and then keeps it up to date with latest schema changes, it's just not easily possible.
@BobWs commented on GitHub (Sep 4, 2019):
Thanks! I've manage to successfully dump my sqlite3 database en imported this in Mariadb. Everything went smooth all users account, organisations and attachment where imported also the TOTP in some of the account.
If I have time I will put my steps together and post it. It will be based on docker synology because that is the machine I'm using.
@mprasil commented on GitHub (Sep 4, 2019):
You can add it to our wiki. Also please add some note that this is not officially supported, because I feel like there are lot of edge cases where this will fail. Thanks for reporting back.