Restore to new XI instance failing.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bionic___
Posts: 54
Joined: Wed Oct 23, 2013 7:49 am

Restore to new XI instance failing.

Post by Bionic___ »

I am trying to import a backup of a previous Nagios XI backup into a fresh instance and it is failing.
The backup is from 2012R2.7
The target is version 5.2.7
It appears that there are files missing from the backup. Should I assume the backup is corrupted or just not compatible?
This is the response to my restore:

Code: Select all

root@localhost /tmp> /usr/local/nagiosxi/scripts/restore_xi.sh /root/Downloads/1462203402.tar.gz 
tar: usr/local/nagiosxi/var/xi-sys.cfg: Not found in archive
tar: Exiting with failure status due to previous errors
tar: usr/local/nagiosxi/var/xi-sys.cfg: Not found in archive
tar: Exiting with failure status due to previous errors
TS=1462472202
Extracting backup to /store/backups/nagiosxi/1462472202-restore...
In /store/backups/nagiosxi/1462472202-restore/1462203402...
Backup files look okay.  Preparing to restore...
Shutting down services...
Restoring directories to /...
Restoring Nagios Core...
Restoring Nagios XI...
Restoring NagiosQL...
Restoring NagiosQL backups...
Restoring NRDP backups...
tar (child): /store/backups/nagiosxi/1462472202-restore/1462203402/nrdp.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Restoring MRTG...
cp: cannot stat ‘/store/backups/nagiosxi/1462472202-restore/1462203402/conf.d’: No such file or directory
Restoring MySQL databases...
Restoring Nagios XI MySQL database...
/usr/local/nagiosxi/scripts/restore_xi.sh: line 253: /store/backups/nagiosxi/1462472202-restore/1462203402/mysql/nagiosxi.sql: No such file or directory
Error restoring MySQL database 'nagiosxi' !
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Restore to new XI instance failing.

Post by bwallace »

This won't work, restoring backups are intended to be between like versions (backup taken from 5.2.2 applied to 5.2.2). That being said, usually distances between fix versions are ok and work, but not between major releases, especially coming from what you were presently running - there have been 40+ releases since 2012R2.7.

Not only that, your 5.2.7 may be damaged now, would it be too much work for you to start over with a fresh install of 5.2.7?

Your options for upgrading / getting to the latest version are:
1) on the 2012R2.7, run through the standard upgrade procedure. To be honest this is going to be more time consuming / problematic than what it's worth though.
2) Recommended: Install 5.2.7 on a another server. Take the config from 2012R2.7 and run it through the config prep tool, them import into 5.2.7 (another big reason for this is that under the hood, 2012 was running Core 3 where on 5.2.7 it is running Core 4)

https://assets.nagios.com/downloads/nag ... p-Tool.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Be sure to check out the Knowledgebase for helpful articles and solutions!
Bionic___
Posts: 54
Joined: Wed Oct 23, 2013 7:49 am

Re: Restore to new XI instance failing.

Post by Bionic___ »

I am not worried about any damage; it is in a VM and I took a snapshot as soon as it was finished installing. I will just move back to that snapshot.
I was not aware of the config-import-prep-tool. I will review the docs and give it a try Monday. (I have Friday off!)
Thanks for the quick response.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Restore to new XI instance failing.

Post by rkennedy »

Sounds good - I'll leave this open for now. Let us know how it goes Monday!
Former Nagios Employee
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Restore to new XI instance failing.

Post by bwallace »

Glad you can just revert to a snapshot -- let us know if any questions arise when you revisit this on Monday.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Bionic___
Posts: 54
Joined: Wed Oct 23, 2013 7:49 am

Re: Restore to new XI instance failing.

Post by Bionic___ »

I did a successful export and import.
It took some tinkering because some of the services did not translate right but it is good now.
Thanks for the help.
You can close the thread as successful.
Locked