Vaultwarden Database
-
Hi all- I'm a bit new to Cloudron and I've been testing Vaultwarden outside of Cloudron for a while (installed as an add-on through Home Assistant) and I need a little guidance on importing my SQLite database from Vaultwarden on Home Assistant to the MySQL database for Vaultwarden in Cloudron.
I can see the database url in the Vaultwarden Admin section, but I'm not quite sure how to connect to it in terminal.
Any help is greatly appreciated!
Thanks!
-
Hi all- I'm a bit new to Cloudron and I've been testing Vaultwarden outside of Cloudron for a while (installed as an add-on through Home Assistant) and I need a little guidance on importing my SQLite database from Vaultwarden on Home Assistant to the MySQL database for Vaultwarden in Cloudron.
I can see the database url in the Vaultwarden Admin section, but I'm not quite sure how to connect to it in terminal.
Any help is greatly appreciated!
Thanks!
Of course, you always figure things out after posting, so I thought I'd do a mini-writeup on exporting your Vaultwarden database from the Home Assistant installation and bringing it into Cloudron's instance. Doing so brought over all of the users and organizations that were created before.
-
I followed this guide to take a SQLite dump of my Home Assistant Vaultwarden database.
-
Once I had the dump, I opened the web terminal for Vaultwarden in Cloudron and uploaded the dump to /tmp
-
Once the database was finished being uploaded, I put Vaultwarden in recovery mode (found under the repair section)
-
After, I clicked on the "MySQL" button, which pasts in the command to connect to the Vaultwarden database in Cloudron. Don't press enter - simply add the following after the connection string: < mysqldump.sql
The string should look something like this:
mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=${CLOUDRON_MYSQL_PASSWORD} --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE} < /tmp/mysqldump.sqlAfter completing these steps, I took Vaultwarden out of recovery mode, went to the admin page, and confirmed all users exported successfully.
-
-
Of course, you always figure things out after posting, so I thought I'd do a mini-writeup on exporting your Vaultwarden database from the Home Assistant installation and bringing it into Cloudron's instance. Doing so brought over all of the users and organizations that were created before.
-
I followed this guide to take a SQLite dump of my Home Assistant Vaultwarden database.
-
Once I had the dump, I opened the web terminal for Vaultwarden in Cloudron and uploaded the dump to /tmp
-
Once the database was finished being uploaded, I put Vaultwarden in recovery mode (found under the repair section)
-
After, I clicked on the "MySQL" button, which pasts in the command to connect to the Vaultwarden database in Cloudron. Don't press enter - simply add the following after the connection string: < mysqldump.sql
The string should look something like this:
mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=${CLOUDRON_MYSQL_PASSWORD} --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE} < /tmp/mysqldump.sqlAfter completing these steps, I took Vaultwarden out of recovery mode, went to the admin page, and confirmed all users exported successfully.
@mazarian thanks for following up!
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login