Comments - Help me understand mariadb-upgrade

 
1 month, 1 week ago Daniel Black

The mariadb-check-upgrade is probably this script or a close variant:

https://git.almalinux.org/rpms/mariadb/src/branch/a9/SOURCES/mariadb-check-upgrade.sh

This relies on the file mysql_upgrade_info in the datadir to identify if an upgrade procedure was performed and if so which version it occurred.

I suspect your database initialization/restore procedure didn't create the file.

So its just a bit confused by the lack of a file. You can create one to silence the warning

echo 10.5.22-MariaDB > mysql_upgrade_info

There was a time previous to 10.5.14 (MDEV-27607) when an installation didn't provide this upgrade file.

 
1 month, 1 week ago Bernhard Donaubauer

I was just about to make a restore again without deleting the "mysql_upgrade_info". mariadb-backup even forces me to empty the datadir. This is really misleading in my opinion.

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!
 
1 month, 1 week ago Bernhard Donaubauer

Thank you for your help.

In fact this file is missing. I made a test and deleted the whole "datadir" and started MariaDB. The database was initialized from scratch and "mysql_upgrade_info" is present.

Something is wrong with the backup/restore procedure!

I made my backup and restore with mariadb-backup according to this manual https://mariadb.com/kb/en/incremental-backup-and-restore-with-mariabackup/.

In the "restore" section there is clearly stated "ensure that the datadir is empty" so I deleted the content of /var/lib/mysql and of course the "mysql_upgrade_info" was deleted too.

Obviously "mariadb-backup" did not create this file so either the manual is wrong or some program involved in the restore/startup process should create this "mysql_upgrade_info" file.

 
1 month, 1 week ago Daniel Black

Yep, sounds like worthy enhancement. Please create a request on https://jira.mariadb.org

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.