Clarification on Migrating Nagios xi Databases Between Servers

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
smoren
Posts: 59
Joined: Tue Sep 29, 2015 7:24 am

Clarification on Migrating Nagios xi Databases Between Servers

Post by smoren »

Hello,

I’m planning to migrate Nagios xi from an old server to a new one. Since I want to avoid carrying over errors and inconsistencies that have accumulated over the years, I aim to start fresh and migrate only the necessary components.

I have already completed much of the preparatory work but encountered an issue regarding the database migration. I would appreciate your guidance.

I assume there should be no issue migrating the nagios and nagiosql databases. I plan to use the following commands:

Code: Select all

mysqldump -uroot -p --no-create-info --complete-insert --ignore-table=nagios.nagios_conninfo nagios > nagios.sql
mysqldump -uroot -p --no-create-info --complete-insert nagiosql > nagiosql.sql
Please confirm if this approach is correct.

For the nagiosxi database, I am uncertain. For example, I noticed discrepancies in the number of rows/options in the xi_options table when comparing the current/old database to a fresh installation. Since I am migrating between different versions of Nagios xi, I am unsure of the implications.

Can I migrate the nagiosxi database using a similar command (after truncating the corresponding tables on the new server)?

Code: Select all

mysqldump -uroot -p --no-create-info --complete-insert --ignore-table=nagiosxi.xi_incidents nagiosxi > nagiosxi.sql
Alternatively, would it be better to avoid migrating this database entirely and instead manually recreate users, dashboards, and other configurations on the new server? Perhaps it would make sense to migrate only selected tables?

Environment Details:
Old Server: RHEL 7, Nagios xi 5.11.2, MariaDB 5.5.68.
New Server: RHEL 9, Nagios xi 2024R1.3.1 (RPM-based installation), MySQL Server 8.0.36.

If you have any specific recommendations or insights for this migration, especially regarding potential pitfalls, it would be very helpful.

Thank you for your assistance.
jsimon
Posts: 318
Joined: Wed Aug 23, 2023 11:27 am

Re: Clarification on Migrating Nagios xi Databases Between Servers

Post by jsimon »

Hi @smoren,

There are a few issues with this approach. You aren't able to migrate from version Nagios xi 5.11.2 to version Nagios xi 2024R1.3.1. Our recommendation would be to install Nagios xi 5.11.2 on the new RHEL 9 server you are looking to migrate to. Perform the migration as described in our Backing up and Restoring Nagios xi documentation. Then when the migration is complete, upgrade the new RHEL 9 server to the current or desired version of Nagios xi.

Alternately, you could start from scratch and manually move over configurations that you would like to preserve. We strongly recommend against the partial approach you're describing as it is likely to leave your server in a broken state. Let us know if you have any other questions about this process.
smoren
Posts: 59
Joined: Tue Sep 29, 2015 7:24 am

Re: Clarification on Migrating Nagios xi Databases Between Servers

Post by smoren »

Thank you for your reply. Actually, I have already manually performed almost everything that the backup script would do. However, I’m hesitant to use the script because the current installation is already in a broken state (with several lingering issues), and I want to avoid bringing those problems into the new server.

Additionally, I’ve successfully performed a manual migration in the past, but that was between the same (or very similar) versions of Nagios xi, so compatibility wasn’t an issue.

I’ve been referring to this Knowledge Base article for guidance instead:
https://support.nagios.com/kb/article/n ... s-492.html

I’m also planning to switch to the RPM-based installation of Nagios xi. Unfortunately, I couldn’t find an RPM for Nagios xi 5.11.2 that is compatible with RHEL 9. If such an RPM exists or if you have any alternative suggestions, I’d appreciate further guidance.

Thanks.
sgardil
Posts: 327
Joined: Wed Aug 09, 2023 9:58 am

Re: Clarification on Migrating Nagios xi Databases Between Servers

Post by sgardil »

smoren wrote: Tue Dec 10, 2024 12:37 pm Thank you for your reply. Actually, I have already manually performed almost everything that the backup script would do. However, I’m hesitant to use the script because the current installation is already in a broken state (with several lingering issues), and I want to avoid bringing those problems into the new server.

Additionally, I’ve successfully performed a manual migration in the past, but that was between the same (or very similar) versions of Nagios xi, so compatibility wasn’t an issue.

I’ve been referring to this Knowledge Base article for guidance instead:
https://support.nagios.com/kb/article/n ... s-492.html

I’m also planning to switch to the RPM-based installation of Nagios xi. Unfortunately, I couldn’t find an RPM for Nagios xi 5.11.2 that is compatible with RHEL 9. If such an RPM exists or if you have any alternative suggestions, I’d appreciate further guidance.

Thanks.
Unfortunately we do not store rpms that old. If you want to swap to rpms in your current situation that means you'll need to do another migration sadly. One from RHEL 7 to RHEL9 with a tarball, then updating the RHEL 9 system, and then finally a migration from tarball RHEL 9 to a RPM version of RHEL 9. Is there a specific reason for wanting to switch to the RPM version?