You'll want to modify a few files in the backup to point back to the local database instance before importing it with the restore script. Open the backup and the nagiosxi and nagios archives in it and modify:
/usr/local/nagiosxi/var/xi-sys.cfg/xi-sys.cfg to use the default credentials I've mentioned earlier
/usr/local/nagios/etc/ndo2db.cfg and /usr/local/nagiosxi/html/config.inc.php to use the default settings. These can be found in https://assets.nagios.com/downloads/nag ... Server.pdf
NagiosXI 5.5 Upgrade (Fresh install)
Re: NagiosXI 5.5 Upgrade (Fresh install)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
russell.it
- Posts: 23
- Joined: Sun Oct 26, 2014 7:46 pm
Re: NagiosXI 5.5 Upgrade (Fresh install)
Cheers.
I will give it ago
I will give it ago
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NagiosXI 5.5 Upgrade (Fresh install)
Let us know if you need further assistancerussell.it wrote:Cheers.
I will give it ago
-
russell.it
- Posts: 23
- Joined: Sun Oct 26, 2014 7:46 pm
Re: NagiosXI 5.5 Upgrade (Fresh install)
Next issue
Restore scripts starts running through and I get the following error after "Restoring Nagios XI MySQL database..."
Modified the three files to point to the new localhost databases.
Re-tared everything backup.
Done a fresh install of XI 5.4.13 on a new RHEL 7 vm. Run the restore script pointing to the backup tarball. Thats the error I get.
Restore scripts starts running through and I get the following error after "Restoring Nagios XI MySQL database..."
So I have backed up my install from the old NagiosXI 5.4.13 instance.ERROR 1046 (3D000) at line 8: No database seletec
Error restoring MySQL database 'nagiosxi' !
Modified the three files to point to the new localhost databases.
Re-tared everything backup.
Done a fresh install of XI 5.4.13 on a new RHEL 7 vm. Run the restore script pointing to the backup tarball. Thats the error I get.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NagiosXI 5.5 Upgrade (Fresh install)
Edit /usr/local/nagiosxi/html/config.inc.php
change this line
to this
change this line
Code: Select all
"dbserver" => '',Code: Select all
"dbserver" => 'localhost',-
russell.it
- Posts: 23
- Joined: Sun Oct 26, 2014 7:46 pm
Re: NagiosXI 5.5 Upgrade (Fresh install)
I just checked all three dbserver lines are set to localhost
Re: NagiosXI 5.5 Upgrade (Fresh install)
Ok, I've updated the script to use a different IP address
First, make sure that the local database uses the same users/passwords as the old database.
Then transfer your backup file to the new server and replace this file with the one I've attached (unzip it first):
Then run the restore script like this:
Then when it's done, you will need to follow the section called Adjust Settings on Nagios XI Server from this guide to change the IP to your new DB:
Make sure to go to Admin > System Settings and update the Program URL and External URL as well.
First, make sure that the local database uses the same users/passwords as the old database.
Then transfer your backup file to the new server and replace this file with the one I've attached (unzip it first):
Code: Select all
/usr/local/nagiosxi/scripts/restore_xi.shCode: Select all
cd /usr/local/nagiosxi/scripts
./restore_xi.sh /path/to/your/backupfile.tar.gz 127.0.0.1Code: Select all
https://assets.nagios.com/downloads/nagiosxi/docs/Offloading_MySQL_to_Remote Server.pdfYou do not have the required permissions to view the files attached to this post.