Skip to content

Commit 005bd27

Browse files
skjnldsvclaude
authored andcommitted
fix(docs): MariaDB is recommended, move before MySQL
MariaDB is the recommended database engine for Nextcloud, not MySQL. Reorder sections so MariaDB comes first and update the introductory sentence accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 9b5d7ee commit 005bd27

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

admin_manual/maintenance/backup.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,28 @@ Backup database
4040

4141
.. warning:: Before restoring a backup see :doc:`restore`
4242

43-
MySQL
44-
^^^^^
45-
46-
MySQL is the recommended database engine. To backup MySQL::
47-
48-
mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
49-
50-
If you have enabled MySQL 4-byte support (:doc:`../configuration_database/mysql_4byte_support`, needed for emoji), add ``--default-character-set=utf8mb4``::
51-
52-
mysqldump --single-transaction --default-character-set=utf8mb4 -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
53-
5443
MariaDB
5544
^^^^^^^
5645

57-
To backup MariaDB using `mariadb-dump <https://mariadb.com/docs/server/clients-and-utilities/backup-restore-and-import-clients/mariadb-dump>`_::
46+
MariaDB is the recommended database engine. To backup MariaDB using `mariadb-dump <https://mariadb.com/docs/server/clients-and-utilities/backup-restore-and-import-clients/mariadb-dump>`_::
5847

5948
mariadb-dump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
6049

6150
If you have enabled MariaDB 4-byte support (:doc:`../configuration_database/mysql_4byte_support`, needed for emoji), add ``--default-character-set=utf8mb4``::
6251

6352
mariadb-dump --single-transaction --default-character-set=utf8mb4 -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
6453

54+
MySQL
55+
^^^^^
56+
57+
To backup MySQL::
58+
59+
mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
60+
61+
If you have enabled MySQL 4-byte support (:doc:`../configuration_database/mysql_4byte_support`, needed for emoji), add ``--default-character-set=utf8mb4``::
62+
63+
mysqldump --single-transaction --default-character-set=utf8mb4 -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
64+
6565
SQLite
6666
^^^^^^
6767
::

admin_manual/maintenance/restore.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,10 @@ Restore database
3232
The easiest way to do this is to drop and recreate the database.
3333
SQLite does this automatically.
3434

35-
MySQL
36-
^^^^^
37-
38-
MySQL is the recommended database engine. To restore MySQL::
39-
40-
mysql -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
41-
mysql -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud"
42-
43-
If you use UTF8 with multibyte support (e.g. for emojis in filenames), use::
44-
45-
mysql -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
46-
mysql -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
47-
4835
MariaDB
4936
^^^^^^^
5037

51-
To restore MariaDB using the `mariadb <https://mariadb.com/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client>`_ client::
38+
MariaDB is the recommended database engine. To restore MariaDB using the `mariadb <https://mariadb.com/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client>`_ client::
5239

5340
mariadb -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
5441
mariadb -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud"
@@ -58,6 +45,19 @@ If you use UTF8 with multibyte support (e.g. for emojis in filenames), use::
5845
mariadb -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
5946
mariadb -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
6047

48+
MySQL
49+
^^^^^
50+
51+
To restore MySQL::
52+
53+
mysql -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
54+
mysql -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud"
55+
56+
If you use UTF8 with multibyte support (e.g. for emojis in filenames), use::
57+
58+
mysql -h [server] -u [username] -p[password] -e "DROP DATABASE nextcloud"
59+
mysql -h [server] -u [username] -p[password] -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
60+
6161

6262
PostgreSQL
6363
^^^^^^^^^^
@@ -72,20 +72,20 @@ Restoring
7272
.. note:: This guide assumes that your previous backup is called
7373
"nextcloud-sqlbkp.bak"
7474

75-
MySQL
76-
^^^^^
77-
78-
MySQL is the recommended database engine. To restore MySQL::
79-
80-
mysql -h [server] -u [username] -p[password] [db_name] < nextcloud-sqlbkp.bak
81-
8275
MariaDB
8376
^^^^^^^
8477

85-
To restore MariaDB using the `mariadb <https://mariadb.com/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client>`_ client::
78+
MariaDB is the recommended database engine. To restore MariaDB using the `mariadb <https://mariadb.com/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client>`_ client::
8679

8780
mariadb -h [server] -u [username] -p[password] [db_name] < nextcloud-sqlbkp.bak
8881

82+
MySQL
83+
^^^^^
84+
85+
To restore MySQL::
86+
87+
mysql -h [server] -u [username] -p[password] [db_name] < nextcloud-sqlbkp.bak
88+
8989
SQLite
9090
^^^^^^
9191
::

0 commit comments

Comments
 (0)