From 1b52eb6ec48dce86910e6a9d0fe529996e628e15 Mon Sep 17 00:00:00 2001 From: eumpf0 <103320491+eumpf0@users.noreply.github.com> Date: Mon, 7 Oct 2024 19:52:29 +0200 Subject: [PATCH] Remove mysqldump's --skip-quote-names option, it is unnecessary (as of 2024) & leads to silent error, corrupting the SQL dump. Make instructions for import the dump clearer. --- Migrating-from-MariaDB-(MySQL)-to-SQLite.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Migrating-from-MariaDB-(MySQL)-to-SQLite.md b/Migrating-from-MariaDB-(MySQL)-to-SQLite.md index 9889bd4..e1c4250 100644 --- a/Migrating-from-MariaDB-(MySQL)-to-SQLite.md +++ b/Migrating-from-MariaDB-(MySQL)-to-SQLite.md @@ -39,8 +39,7 @@ mysqldump \ --single-transaction \ --no-create-db \ --no-create-info \ - --hex-blob \ - --skip-quote-names \ + --hex-blob \ | grep -a "^INSERT INTO" | grep -a -v "__diesel_schema_migrations" \ | sed 's#\\"#"#gm' \ | sed -sE "s#,0x([^,]*)#,X'\L\1'#gm" \ @@ -51,11 +50,11 @@ You should be prompted to enter a password, enter your password and press enter. This should generate a file `mysql-to-sqlite.sql` which holds your database. Now look for the db.sqlite3 file Vaultwarden created in the previous step when you started Vaultwarden for the first time using SQLite as it's database. -Copy or move the `mysql-to-sqlite.sql` so that both `db.sqlite3` and the export are in the same directory. +Copy or move `mysql-to-sqlite.sql` to the same directory as `db.sqlite3`. Now you can execute the following ```bash -sqlite3 db_new.sqlite3 < mysql-to-sqlite.sql +sqlite3 db.sqlite3 < mysql-to-sqlite.sql ``` This should have filled the SQLite database with the dump, and you can now start Vaultwarden again using SQLite instead of MySQL.