Page 2 of 2
Re: NAGIOS XI MIGRATION
Posted: Mon Aug 21, 2023 10:08 pm
by kmsharma
lgute wrote: ↑Mon Aug 21, 2023 9:38 am
Hi
@kmsharma, thanks for reaching out.
I am sorry you are having so much trouble migrating. I see you are trying to migrate XI from Ubuntu 22 to Debian 10. I want to try and reproduce the issues you are having. In order to do so, I need a bit more information.
- What version of XI are you running Ubuntu 22?
- What version of XI are you running on Debian 10?
On Both the server I am using the same version of Nagios xi and the latest one i.e. 5.11.1.
Please let me know if any other details are required.
Thanks for your help
It will be a great help .
Re: NAGIOS XI MIGRATION
Posted: Thu Aug 24, 2023 4:00 am
by kmsharma
kmsharma wrote: ↑Mon Aug 21, 2023 10:08 pm
lgute wrote: ↑Mon Aug 21, 2023 9:38 am
Hi
@kmsharma, thanks for reaching out.
I am sorry you are having so much trouble migrating. I see you are trying to migrate XI from Ubuntu 22 to Debian 10. I want to try and reproduce the issues you are having. In order to do so, I need a bit more information.
- What version of XI are you running Ubuntu 22?
- What version of XI are you running on Debian 10?
On Both the server I am using the same version of Nagios xi and the latest one i.e. 5.11.1.
Please let me know if any other details are required.
Thanks for your help
It will be a great help .
Hey
Do we have any update on this?
Re: NAGIOS XI MIGRATION
Posted: Thu Aug 24, 2023 1:46 pm
by lgute
Hi
@kmsharma,
A couple of things.
- Do not change the name of the backup file. If it is 1692893591.tar.gz do keep this name when you move it to the new server.
- There is a problem with the restore process on Debian 10 and a Bug Issue has been created.
The restore process should look like this...
Code: Select all
# /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1692893591.tar.gz
WARNING: you are trying to restore a ubuntu22 backup on a el9 system
Compiled plugins and other binaries as well as httpd configurations
will NOT be restored.
You will need to re-download the Nagios XI tarball, and re-install
the subcomponents for this system. More info here:
https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf
Are you sure you want to continue? [y/N] y
TS=1692900165
Extracting backup to /store/backups/nagiosxi/1692900165-restore...
In /store/backups/nagiosxi/1692900165-restore/1692893591...
Backup files look okay. Preparing to restore...
Shutting down services...
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...
/usr/share/snmp/mibs/iana: No such file or directory
/usr/share/snmp/mibs/ietf: No such file or directory
Restoring MySQL databases...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Restoring Nagios XI MySQL database...
mysql: [Warning] Using a password on the command line interface can be insecure.
Restarting database servers...
Restoring Apache cronjobs...
Restoring logrotate config files...
Skipping Apache config files restoration
===============
RESTORE COMPLETE
===============
When I run the restore_xi script on Debian 10, it reports lots of errors, ending with...
Code: Select all
# /usr/local/nagiosxi/scripts/restore_xi.sh /tmp/1692893591.tar.gz
WARNING: you are trying to restore a ubuntu22 backup on a debian10 system
Compiled plugins and other binaries as well as httpd configurations
will NOT be restored.
You will need to re-download the Nagios XI tarball, and re-install
the subcomponents for this system. More info here:
https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf
Are you sure you want to continue? [y/N] y
TS=1692901444
Extracting backup to /store/backups/nagiosxi/1692901444-restore...
In /store/backups/nagiosxi/1692901444-restore/1692893591...
Backup files look okay. Preparing to restore...
Shutting down services...
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...
/usr/share/snmp/mibs/ietf: No such file or directory
/usr/share/snmp/mibs/iana: No such file or directory
/usr/share/snmp/mibs/ietf: No such file or directory
/usr/share/snmp/mibs/iana: No such file or directory
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-MIB): At line 1 in (none)
Cannot find module (IF-MIB): At line 1 in (none)
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
...
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyStart ::= { netSnmpNotifications 1 }
Restoring MySQL databases...
Restoring Nagios XI MySQL database...
ERROR 1273 (HY000) at line 24: Unknown collation: 'utf8mb4_0900_ai_ci'
Error restoring MySQL database 'nagiosxi' !
By the way, if you are unhappy with the response time or results from this forum, you can go to
Nagios Support for ticket/email support and/or inquire with
[email protected] about a phone support plan.
Re: NAGIOS XI MIGRATION
Posted: Thu Aug 24, 2023 11:50 pm
by kmsharma
Hi
lgute wrote: ↑Thu Aug 24, 2023 1:46 pm
Hi
@kmsharma,
A couple of things.
- Do not change the name of the backup file. If it is 1692893591.tar.gz do keep this name when you move it to the new server.
- There is a problem with the restore process on Debian 10 and a Bug Issue has been created.
The restore process should look like this...
Code: Select all
# /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1692893591.tar.gz
WARNING: you are trying to restore a ubuntu22 backup on a el9 system
Compiled plugins and other binaries as well as httpd configurations
will NOT be restored.
You will need to re-download the Nagios XI tarball, and re-install
the subcomponents for this system. More info here:
https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf
Are you sure you want to continue? [y/N] y
TS=1692900165
Extracting backup to /store/backups/nagiosxi/1692900165-restore...
In /store/backups/nagiosxi/1692900165-restore/1692893591...
Backup files look okay. Preparing to restore...
Shutting down services...
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...
/usr/share/snmp/mibs/iana: No such file or directory
/usr/share/snmp/mibs/ietf: No such file or directory
Restoring MySQL databases...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Restoring Nagios XI MySQL database...
mysql: [Warning] Using a password on the command line interface can be insecure.
Restarting database servers...
Restoring Apache cronjobs...
Restoring logrotate config files...
Skipping Apache config files restoration
===============
RESTORE COMPLETE
===============
When I run the restore_xi script on Debian 10, it reports lots of errors, ending with...
Code: Select all
# /usr/local/nagiosxi/scripts/restore_xi.sh /tmp/1692893591.tar.gz
WARNING: you are trying to restore a ubuntu22 backup on a debian10 system
Compiled plugins and other binaries as well as httpd configurations
will NOT be restored.
You will need to re-download the Nagios XI tarball, and re-install
the subcomponents for this system. More info here:
https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf
Are you sure you want to continue? [y/N] y
TS=1692901444
Extracting backup to /store/backups/nagiosxi/1692901444-restore...
In /store/backups/nagiosxi/1692901444-restore/1692893591...
Backup files look okay. Preparing to restore...
Shutting down services...
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...
/usr/share/snmp/mibs/ietf: No such file or directory
/usr/share/snmp/mibs/iana: No such file or directory
/usr/share/snmp/mibs/ietf: No such file or directory
/usr/share/snmp/mibs/iana: No such file or directory
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-MIB): At line 1 in (none)
Cannot find module (IF-MIB): At line 1 in (none)
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
...
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyStart ::= { netSnmpNotifications 1 }
Restoring MySQL databases...
Restoring Nagios XI MySQL database...
ERROR 1273 (HY000) at line 24: Unknown collation: 'utf8mb4_0900_ai_ci'
Error restoring MySQL database 'nagiosxi' !
By the way, if you are unhappy with the response time or results from this forum, you can go to
Nagios Support for ticket/email support and/or inquire with
[email protected] about a phone support plan.
What should be my next step to resolve this issue?
what you suggest to migrate my nagios xi.
Thank you
Re: NAGIOS XI MIGRATION
Posted: Fri Aug 25, 2023 10:08 am
by lgute
Hi
@kmsharma,
It looks like the issue is being caused by a change in the MySql versions. Ubuntu 22 has version 8.0.34-0ubuntu0.22.04.1, while Debian has version 15.1 Distrib 10.3.39-MariaDB and the supported collation types have changed between versions.
If you want to try to fix this now, rather than wait until we get a full fix tested and released, you can do the following...
- Restore your Debian server from a Debian backup, or start over.
- cd /tmp
- Copy the Ubuntu backup tarball to /tmp.
- Un-tar your backup file, e.g., tar xf 1692893591.tar.gz
- Edit the nagiosxi.sql file, for example: vi /tmp/<tarball-name>/mysql/nagiosxi.sql
- Find the CREATE DATABASE statement and change utf8mb4_0900_ai_ci to utf8mb4_general_ci.
- Save and exit the file.
- Rename the original tarball/backup file.
- Re-tar the directory, e.g., tar zcvf 1692893591.tar.gz 1692893591
- Re-run the restore script, e.g., /usr/local/nagiosxi/scripts/restore_xi.sh /tmp/1692893591.tar.gz
- Run the Changed Operating System Version / Architecture / Family steps, from the documentation.
If you decide to proceed, please let us know how this goes for you and good luck.
Re: NAGIOS XI MIGRATION
Posted: Fri Aug 25, 2023 8:37 pm
by kmsharma
lgute wrote: ↑Fri Aug 25, 2023 10:08 am
Hi
@kmsharma,
It looks like the issue is being caused by a change in the MySql versions. Ubuntu 22 has version 8.0.34-0ubuntu0.22.04.1, while Debian has version 15.1 Distrib 10.3.39-MariaDB and the supported collation types have changed between versions.
If you want to try to fix this now, rather than wait until we get a full fix tested and released, you can do the following...
- Restore your Debian server from a Debian backup, or start over.
- cd /tmp
- Copy the Ubuntu backup tarball to /tmp.
- Un-tar your backup file, e.g., tar xf 1692893591.tar.gz
- Edit the nagiosxi.sql file, for example: vi /tmp/<tarball-name>/mysql/nagiosxi.sql
- Find the CREATE DATABASE statement and change utf8mb4_0900_ai_ci to utf8mb4_general_ci.
- Save and exit the file.
- Rename the original tarball/backup file.
- Re-tar the directory, e.g., tar zcvf 1692893591.tar.gz 1692893591
- Re-run the restore script, e.g., /usr/local/nagiosxi/scripts/restore_xi.sh /tmp/1692893591.tar.gz
- Run the Changed Operating System Version / Architecture / Family steps, from the documentation.
If you decide to proceed, please let us know how this goes for you and good luck.
Hi ,
I have clarity issue in point no 8,9 .
also I am waiting for your full tested and verified release .
when can I expect that release?
Thanks mate for your help till now.
Re: NAGIOS XI MIGRATION
Posted: Mon Aug 28, 2023 9:43 am
by lgute
Hi
@kmsharma,
If this does
not provide the clarity you are looking for with Steps 8 & 9, please let me know.
8. Rename the original tarball/backup file.
I am assuming the original backup tarball is in /tmp, so I am having you rename it, so when you re-tar the directory, the original backup tarball is not overwritten.
9. Re-tar the directory, e.g., tar zcvf 1692893591.tar.gz 1692893591
Code: Select all
tar zcvf <backup filename>.tar.gz <directory from original un-tar (step 4)>
So, if the original backup file is 1234567890.tar.gz, the directory/folder created from Step 4 should be 1234567890, and then the command to re-create the tarball with the modified nagiosxi.sql file would be...
Code: Select all
tar zcvf 1234567890.tar.gz 1234567890
The result would be to create a gzip archive with the same name as the original backup file, from the directory created in step 4 that contains the modified nagiosxi.sql file.
Re: NAGIOS XI MIGRATION
Posted: Fri Sep 08, 2023 7:21 am
by kmsharma
lgute wrote: ↑Mon Aug 28, 2023 9:43 am
Hi
@kmsharma,
If this does
not provide the clarity you are looking for with Steps 8 & 9, please let me know.
8. Rename the original tarball/backup file.
I am assuming the original backup tarball is in /tmp, so I am having you rename it, so when you re-tar the directory, the original backup tarball is not overwritten.
9. Re-tar the directory, e.g., tar zcvf 1692893591.tar.gz 1692893591
Code: Select all
tar zcvf <backup filename>.tar.gz <directory from original un-tar (step 4)>
So, if the original backup file is 1234567890.tar.gz, the directory/folder created from Step 4 should be 1234567890, and then the command to re-create the tarball with the modified nagiosxi.sql file would be...
Code: Select all
tar zcvf 1234567890.tar.gz 1234567890
The result would be to create a gzip archive with the same name as the original backup file, from the directory created in step 4 that contains the modified nagiosxi.sql file.
Hey ,
Thank you
I am waiting for your final release.