mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-16 05:34:10 +03:00
Migration from sqlite to mysql incomplete #866
Reference in New Issue
Block a user
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 @fbartels on GitHub (Nov 23, 2020).
Subject of the issue
When following the instructions outlined in https://github.com/dani-garcia/bitwarden_rs/wiki/Using-the-MySQL-Backend and https://github.com/dani-garcia/bitwarden_rs/issues/984 to switch from the default sqlite database to a mysql one, users are able to login and see entries. but entries are missing all data such as usernames, passwords, 2fa token, urls (attachments however are preserved).
Your environment
Steps to reproduce
sqlite3 db.sqlite3 .dump | grep "^INSERT INTO" | grep -v "__diesel_schema_migrations" > sqlitedump.sql ; echo -ne "SET FOREIGN_KEY_CHECKS=0;\n$(cat sqlitedump.sql)" > mysqldump.sqlsed -i s#\"#\#g mysqldump.sqlmysql --force --password --user=bitwarden_rs --database=bitwarden_rs < mysqldump.sqlExpected behaviour
Actual behaviour
Relevant logs
@BlackDex commented on GitHub (Nov 23, 2020):
Did you used the exact same version for sqlite as for mysql?
Not that you used an older sqlite version, and have the mysql run migrations on the database for a newer version.
Because that would cause conflicts.
Those above procedure i have written my self, and i just tested them again, and they seem to work.
@fbartels commented on GitHub (Nov 28, 2020):
Thanks for your feedback @BlackDex. The source system was an official build and the target is a self compiled with only mysql support.
Since it works for you I probably made a mistake somewhere, but before reporting i already tried it twice.
But given that I only need to migrate two users I think I will just use Portwarden to get my users on the new system.
@BlackDex commented on GitHub (Nov 28, 2020):
It could be some other strange item like, encoding of the database, like unicode utf8.
Do you not get any error message at all during either export or import?