From 08dc02f58b6fb7a135d829786bdf77c64c471559 Mon Sep 17 00:00:00 2001 From: simonmicro Date: Sat, 6 May 2023 18:59:08 +0200 Subject: [PATCH 1/3] Fixed minor typo --- docs/configuration.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 394e27f7..2f543f7e 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -313,12 +313,12 @@ Alternatives hosted options like PostgreSQL and MariaDB/MySQL can be configured but the development team recommends against it. Indeed, there is currently very little data to be stored and SQLite is deemed both sufficient, simpler and more reliable overall. -- ``SQLALCHEMY_DATABASE_URI`` (default: sqlite:////data/main.db): the SQLAlchemy database URL for accessing the database -- ``SQLALCHEMY_DATABASE_URI_ROUNDCUBE`` (default: sqlite:////data/roundcube.db): the Roundcube database URL for accessing the Roundcube database +- ``SQLALCHEMY_DATABASE_URI`` (default: ``sqlite:////data/main.db``): the SQLAlchemy database URL for accessing the database +- ``SQLALCHEMY_DATABASE_URI_ROUNDCUBE`` (default: ``sqlite:////data/roundcube.db``): the Roundcube database URL for accessing the Roundcube database For PostgreSQL use driver postgresql (``SQLALCHEMY_DATABASE_URI=postgresql://mailu:mailu_secret_password@database/mailu``). -For MariaDB/MySQL use driver mysql+mysqlconnector (``SQLALCHEMY_DATABASE_URI= mysql+mysqlconnector://mailu:mailu_secret_password@database/mailu```). +For MariaDB/MySQL use driver mysql+mysqlconnector (``SQLALCHEMY_DATABASE_URI= mysql+mysqlconnector://mailu:mailu_secret_password@database/mailu``). For Roundcube, refer to the `roundcube documentation`_ for the URL specification. From 7b9204b7d829cb729425ede3e45c4527e92be60a Mon Sep 17 00:00:00 2001 From: simonmicro Date: Sat, 6 May 2023 19:05:37 +0200 Subject: [PATCH 2/3] Corrected migration instructions --- docs/database.rst | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/database.rst b/docs/database.rst index 7163acaf..270d02dc 100644 --- a/docs/database.rst +++ b/docs/database.rst @@ -17,11 +17,20 @@ This means it is not possible to switch the database back-end used by roundcube To switch to a different database back-end: -1. Run config-export to export the configuration. E.g. `docker compose exec admin flask mailu config-export --secrets --output mail-config.yml` -2. Set up your new database server. Refer to the subsequent sections for tips for creating the database. +1. Run config-export to export the configuration. E.g. `docker compose exec admin flask mailu config-export --secrets --output /data/mail-config.yml` +2. Setup your new database server. Refer to the subsequent sections for tips for creating the database. 3. Modify the database settings (SQLAlchemy database URL) in mailu.env. Refer to the :ref:`configuration guide (link) ` for the exact settings. 4. Start your Mailu deployment. -5. Run config-import to import the configuration. E.g. `docker exec -i $(docker compose ps -q admin) flask mailu config-import -v < mail-config.yml` +5. Run config-import to import the configuration... + + 1. Drop into a shell inside the admin container as you'll need to execute multiple commands. E.g. `docker exec -i $(docker compose ps -q admin) bash` + + 2. Initialize the new database backend: `flask mailu db init` + + 3. Migrate the new database backend to the current state: `flask mailu db upgrade` + + 4. Import the configuration export: `flask mailu config-import -v < /data/mail-config.yml` + Mailu has now been switched to the new database back-end. The Mailu configuration has also been migrated. From 849f8c0167541460d1ffc7db1ba0a7b3c0f1b433 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 23 Jun 2023 14:34:22 +0200 Subject: [PATCH 3/3] Update database.rst "Set up" is correct in this case. --- docs/database.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/database.rst b/docs/database.rst index 270d02dc..26da8dd5 100644 --- a/docs/database.rst +++ b/docs/database.rst @@ -18,7 +18,7 @@ This means it is not possible to switch the database back-end used by roundcube To switch to a different database back-end: 1. Run config-export to export the configuration. E.g. `docker compose exec admin flask mailu config-export --secrets --output /data/mail-config.yml` -2. Setup your new database server. Refer to the subsequent sections for tips for creating the database. +2. Set up your new database server. Refer to the subsequent sections for tips for creating the database. 3. Modify the database settings (SQLAlchemy database URL) in mailu.env. Refer to the :ref:`configuration guide (link) ` for the exact settings. 4. Start your Mailu deployment. 5. Run config-import to import the configuration...