Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
-
None
-
None
-
Alma9
Description
In order to restore from backup you have to empty your datadir. This is clearly stated here in the restore section and enforced my mariadb-backup.
mariadb-backup --copy-back --target-dir=2024-08-05-10-22-37
|
mariadb-backup based on MariaDB server 10.5.22-MariaDB Linux (x86_64)
|
[00] 2024-08-06 08:15:37 Original data directory /var/lib/mysql is not empty!
|
But this directory contains a file called mysql_upgrade_info. This file contains the version of MariaDB and is necessary for:
- mariadb-check-upgrade
- mariadb-upgrade
Because of this missing file MariaDB tells you to upgrade your database again and again.
● mariadb.service - MariaDB 10.5 database server
|
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; preset: disabled)
|
Active: active (running) since Mon 2024-08-05 10:41:59 CEST; 25s ago
|
Docs: man:mariadbd(8)
|
https://mariadb.com/kb/en/library/systemd/
|
Process: 16205 ExecStartPre=/usr/libexec/mariadb-check-socket (code=exited, status=0/SUCCESS)
|
Process: 16227 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
|
Process: 16277 ExecStartPost=/usr/libexec/mariadb-check-upgrade (code=exited, status=0/SUCCESS)
|
Main PID: 16262 (mariadbd)
|
Status: "Taking your SQL requests now..."
|
Tasks: 14 (limit: 99748)
|
Memory: 105.0M
|
CPU: 133ms
|
CGroup: /system.slice/mariadb.service
|
└─16262 /usr/libexec/mariadbd --basedir=/usr
|
|
Aug 05 10:41:59 pc144033 systemd[1]: Starting MariaDB 10.5 database server...
|
Aug 05 10:41:59 pc144033 mariadb-prepare-db-dir[16227]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
|
Aug 05 10:41:59 pc144033 mariadb-prepare-db-dir[16227]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: The datadir located at /var/lib/mysql needs to be upgraded using 'mariadb-upgrade' tool. This can be d>
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: 1. Back-up your data before with 'mariadb-upgrade'
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: 2. Start the database daemon using 'systemctl start mariadb.service'
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: 3. Run 'mariadb-upgrade' with a database user that has sufficient privileges
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: Read more about 'mariadb-upgrade' usage at:
|
Aug 05 10:41:59 pc144033 mariadb-check-upgrade[16299]: https://mariadb.com/kb/en/mysql_upgrade/
|
Aug 05 10:41:59 pc144033 systemd[1]: Started MariaDB 10.5 database server.
|
This is in my opinion really misleading and could turn an already stressful situation to hell.
So I beg you to:
- add the circumstances of mariadb-upgrade and mysql_upgrade_info to the restore section of the manual
- make mariadb-backup or some other programm involved in the restore process create the mysql_upgrade_info file
BTW: I asked this at the community forum where some kind guy explained the problem to me.