Acc to the migration document present on nagios website ,it says after copying the backup to the new server extract it and copy the files to correct location.
since after extracting the backup I got other tar.gz files and some directory e.g. httpd ,mysql etc.
I want to know which files after extracting the backup tar.gz are to be copied and to which location.
I want to know the files and their location where I should copy them before running the restore script.
NAGIOS xi MIGRATION
-
- Posts: 326
- Joined: Wed Aug 09, 2023 9:58 am
Re: NAGIOS xi MIGRATION
Hey @kmsharma, thanks for reaching out.
If you have the backup tar.gz, all you should have to do is move the file to /store/backups/nagiosxi/ directory. While the tarball is in this location, all that is needed to be done in order to restore this back up is run this script /usr/local/nagiosxi/scripts/restore_xi.sh </store/backups/nagiosxi/{tar.gz}>
Example:
/usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1279411912.tar.gz
Hope this helps, if you have any further questions feel free to reach out.
Related docs:
https://assets.nagios.com/downloads/nag ... ios-xi.pdf
https://support.nagios.com/kb/article/m ... r-892.html
If you have the backup tar.gz, all you should have to do is move the file to /store/backups/nagiosxi/ directory. While the tarball is in this location, all that is needed to be done in order to restore this back up is run this script /usr/local/nagiosxi/scripts/restore_xi.sh </store/backups/nagiosxi/{tar.gz}>
Example:
/usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1279411912.tar.gz
Hope this helps, if you have any further questions feel free to reach out.
Related docs:
https://assets.nagios.com/downloads/nag ... ios-xi.pdf
https://support.nagios.com/kb/article/m ... r-892.html
-
- Posts: 33
- Joined: Thu Jul 13, 2023 10:38 pm
Re: NAGIOS xi MIGRATION
can anyone plz answer this?kmsharma wrote: ↑Wed Jul 26, 2023 3:55 am Acc to the migration document present on nagios website ,it says after copying the backup to the new server extract it and copy the files to correct location.
since after extracting the backup I got other tar.gz files and some directory e.g. httpd ,mysql etc.
I want to know which files after extracting the backup tar.gz are to be copied and to which location.
I want to know the files and their location where I should copy them before running the restore script.
it would be a great help.
-
- Posts: 33
- Joined: Thu Jul 13, 2023 10:38 pm
Re: NAGIOS xi MIGRATION
when you read these documents, it says after moving your tar.gz backup from old server to new server on the location /store/backups/nagiosxi/sgardil wrote: ↑Tue Aug 15, 2023 9:46 am Hey @kmsharma, thanks for reaching out.
If you have the backup tar.gz, all you should have to do is move the file to /store/backups/nagiosxi/ directory. While the tarball is in this location, all that is needed to be done in order to restore this back up is run this script /usr/local/nagiosxi/scripts/restore_xi.sh </store/backups/nagiosxi/{tar.gz}>
Example:
/usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1279411912.tar.gz
Hope this helps, if you have any further questions feel free to reach out.
Related docs:
https://assets.nagios.com/downloads/nag ... ios-xi.pdf
https://support.nagios.com/kb/article/m ... r-892.html
untar the tar.gz backup and copy the files to respected directory.
here i got confused ----what are these respected directories?
-
- Posts: 326
- Joined: Wed Aug 09, 2023 9:58 am
Re: NAGIOS xi MIGRATION
Sorry for the confusion, it does say that in the overview of restoring from a back up. On page 12 of the pdf it goes over the way to restore from command line which is the suggested way. The script will move the files to the correct locations and will be much more seamless than moving the files to their corresponding locations. The example I posted above is how to run the command line script. I don't recommend moving them manually as there's an exponentially higher chance of causing issues. However the files should have the same names if you were dead set on doing it that way.
-
- Posts: 33
- Joined: Thu Jul 13, 2023 10:38 pm
Re: NAGIOS xi MIGRATION
so ,i have to just put backup tar.gz to the given location in new server and just have to run the restore script without even doing untar of the backup that i got from old server?sgardil wrote: ↑Thu Aug 17, 2023 9:53 am Sorry for the confusion, it does say that in the overview of restoring from a back up. On page 12 of the pdf it goes over the way to restore from command line which is the suggested way. The script will move the files to the correct locations and will be much more seamless than moving the files to their corresponding locations. The example I posted above is how to run the command line script. I don't recommend moving them manually as there's an exponentially higher chance of causing issues. However the files should have the same names if you were dead set on doing it that way.
-
- Posts: 326
- Joined: Wed Aug 09, 2023 9:58 am
Re: NAGIOS xi MIGRATION
Correct, that should be all that is needed to be done if you are restoring a backup in the same distro, i.e cent 8 to cent 9. Otherwise you'll need to also run the restore script. If this gives you any issues when running the script let us know.
-
- Posts: 33
- Joined: Thu Jul 13, 2023 10:38 pm
Re: NAGIOS xi MIGRATION
Thank you
I will let you know if I face any problem.
-
- Posts: 33
- Joined: Thu Jul 13, 2023 10:38 pm
Re: NAGIOS xi MIGRATION
I was migrating my nagiosxi from ubuntu22.04 to debian10
after moving the backup form old to new server and running restoring script ,I was getting error ,then I ran restore_repair.sh then I was getting database error on browser
"A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh"
then i ran the above told script ,then it is giving me an error
"nagios database repair succeeded
nagiosxi database repair FAILED, please check output above!
"/usr/local/nagiosxi/scripts/repairmysql.sh: line 112: pushd: /var/lib/mysql/nagiosxi: No such file or directory
ERROR: Could not change to dir: /var/lib/mysql/nagiosxi""
then i created the given dir structure
and again ran the database repair script
now script output is restored successfully but on browser it is saying
"SQL Error [nagiosxi] : Table 'nagiosxi.xi_cmp_favorites' doesn't exist"
what to do now?
This is what I am getting after doing all the steps
-
- Posts: 317
- Joined: Mon Apr 06, 2020 2:49 pm
Re: NAGIOS xi MIGRATION
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?
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?
Please let us know if you have any other questions or concerns.
-Laura
-Laura