mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 01:10:09 +03:00
DB restore #2306
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 @Biepa on GitHub.
Hello together,
I am using the command in the documentation to backup the db.
sqlite3 /$DATA_FOLDER/db.sqlite3 ".backup '/$DATA_FOLDER/db-backup/backup.sq3'"Unfortunately my knowledge about databases is very limited.
How do I restore a backup.sq3 file?
Tried it with...
sqlite3 db.sqlite3 < backup.sq3but getting a "syntax error".
Is that because of the different endings?
@dani-garcia commented on GitHub:
The backup should be a simple copy of the original database, I think. I'm not sure why we are using different extensions, that seems confusing.
Simply replace the
db.sqlite3file with the backup to restore it (This probably needs to be done when bitwarden_rs is stopped)@mprasil commented on GitHub:
Agreed, I think we should also add restore information. I guess @Biepa was trying to approach this as restore from dump as it's more common with MySQL/Postgres? So maybe we need to be more specific that
.backupcommand does consistent copy of the binary database and it's not the same as.dumpwhich is probably what @Biepa was expecting.@dani-garcia commented on GitHub:
The documentation is updated now with #224
@Biepa commented on GitHub:
A simple copy with stopped container worked without problems. Thank you for the quick answer.
@Biepa commented on GitHub:
@mprasil You're right. That was, what I expected.
And if there isn't a need for the different endings, maybe that could also be changed in the documentation as it confused me a bit.