Test i migrated successfuly from centos 7 to redhat 9. No issues, all went smooth and after the migration was able to upgrade nagiosxi to the latest version too. Test nagiosxi has default mysql root password.
Now the devel version im not able to get migrated properly, here are the steps i follow.
1) On new instance, Redhat 9, i do nagios fullinstall. NagiosXI version is the same as the running devel version, 5.11.2
2) On the running version, centos 7 and nagiosxi 5.11.2 i create a backup from the webui and transfer it to the Redhat 9 server.
3) Fullinstall finishes without any errors.
4) /usr/local/nagiosxi/scripts/restore_xi.sh i change the „themysqlpass“ value to the mysql root password. On the running version i check it with „mysql -u root -p“ command, i got the correct mysql root password and its not the default. Mysql server version: 5.5.68-MariaDB
5) I run the „/usr/local/nagiosxi/scripts/restore_xi.sh /backupfile/location/file.gz“ to restore the backup that was created earlier.
6) Now here things get broken, the restore starts:
Restoring directories to /...
Restoring Nagios Core...
Restoring Nagios XI...
Restoring NRDP backups...
Restoring MRTG...
Restoring SNMP configuration files...
Restoring SNMP MIBs...
Restoring Nagvis backups...
Restoring nagios home dir...
Restoring MySQL databases...
ERROR: Could not connect to localhost:3306 with root password supplied.
Please enter the MySQL root password:
7) It will not accept the mysql root password from the running instance and what was changed to in themysqlpass value, instead it now accepts the default password, nagiosxi. For some reason the restore script changes the mysql root back to default

8) Restore completes without giving any errors, RESTORE COMPLETE.
9) i run restore_repair.sh skript:
Shared module ndo.so installed
/usr/local/nagios/etc/nagios.cfg configured to use NDO
UPGRADE: POST-UPGRADE: NDO post upgrade started...
Performing install...
> Creating database with user
> Enter MySQL root password:
It waits for the default nagiosxi password and it ends with:
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'nagios'; database exists
Something went wrong creating database 'nagios'
Finished restore repair OK
In nagios.log i have diferent errors:
[1714730335] Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: cannot open shared object file: No such file or directory
[1714730335] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1714730335] Error: Module loading failed. Aborting.
[1714730803] NDO-3: NDO 3.1.0 (c) Copyright 2009-2023 Nagios - Nagios Core Development Team
[1714730803] NDO-3: Unable to connect to mysql. Configuration may be incorrect or database may have temporarily disconnected.
[1714730803] NDO-3: NDO was not able to initialize the database (main context) and will not start.
[1714730803] Event broker module '/usr/local/nagios/bin/ndo.so' initialized successfully.
10) In mysql i run: GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; and run restore_repair.sh again. Nothing changes, logs still have db connection errors and no running nagios.
Also not sure if its related or not, the new install now has no ndo2db file available also.
So probably the main issue is the restore of the dump and why the mysql root password is reset back to default.