Upgrade CentOS 6.7 to CentOS 7

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
Locked
dcarballido
Posts: 5
Joined: Wed Jun 08, 2016 3:56 am

Upgrade CentOS 6.7 to CentOS 7

Post by dcarballido »

Hello,
I wanted to migrate my CentOS 6 to CentOS 7.
My version of 2014r1.9 NNA.
can make a backup as NXI?
dcarballido
Posts: 5
Joined: Wed Jun 08, 2016 3:56 am

Re: Upgrade CentOS 6.7 to CentOS 7

Post by dcarballido »

Error with restore backup:

[root@localhost scripts]# ./restore_na.sh /store/backups/nagiosna/1466525262.tar.gz
PHP Notice: Undefined index: HTTP_HOST in /var/www/html/nagiosna/application/config/config.local.php on line 22
Unable to find backup file /store/backups/nagiosna/1466525262.tar.gz!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Upgrade CentOS 6.7 to CentOS 7

Post by rkennedy »

Can you verify this file exists and post the output? ls -l /store/backups/nagiosna/1466525262.tar.gz
Former Nagios Employee
dcarballido
Posts: 5
Joined: Wed Jun 08, 2016 3:56 am

Re: Upgrade CentOS 6.7 to CentOS 7

Post by dcarballido »

yes, exist.

[root@localhost ~]# ls -l /store/backups/nagiosna/1466525262.tar.gz
-rw-rw-r--. 1 nna nnacmd 4513 Jun 21 16:07 /store/backups/nagiosna/1466525262.tar.gz
dcarballido
Posts: 5
Joined: Wed Jun 08, 2016 3:56 am

Re: Upgrade CentOS 6.7 to CentOS 7

Post by dcarballido »

Solution:

[root@localhost ~]# cd /store/backups/nagiosna/
[root@localhost nagiosna]# /usr/local/nagiosna/scripts/restore_na.sh 1466525262.tar.gz
PHP Notice: Undefined index: HTTP_HOST in /var/www/html/nagiosna/application/config/config.local.php on line 22
TS=1466592888
Extracting backup to /store/backups/nagiosna/1466592888-restore...
In /store/backups/nagiosna/1466592888-restore/1466525262...
Backup files look okay. Preparing to restore...
Shutting down services...
NagiosNA backend stopped.
Restoring flow files to /usr/local/nagiosna/var/...
Restoring MySQL databases...
Restarting database servers...
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit mysqld.service failed to load: No such file or directory.
Restoring Apache config files...
sudo: /etc/init.d/iptables: command not found
Could not open the requested socket: Address already in use
Terminated due to errors.
NagiosNA backend started...

===============
RESTORE COMPLETE
===============
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Upgrade CentOS 6.7 to CentOS 7

Post by bwallace »

Appreciate you posting the solution - thanks -
I attempted to reproduce this here using NNA 2.2.1 on Cent 7 and it and looks like this is by design, only in 2.2.1 we get a more helpful error:

Code: Select all

[root@localhost scripts]# ./restore_na.sh /store/backups/nagiosna 1466608424.tar.gz
Usage: ./restore_na.sh <backupfile>
...and the restore worked fine fine when following that directive, which is what you wound up doing anyway. Sorry the error message wasn't as helpful in your version of NNA.
Were there any other questions or are we good to lock this thread?
Be sure to check out the Knowledgebase for helpful articles and solutions!
dcarballido
Posts: 5
Joined: Wed Jun 08, 2016 3:56 am

Re: Upgrade CentOS 6.7 to CentOS 7

Post by dcarballido »

all good,
any question, thanks for support
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Upgrade CentOS 6.7 to CentOS 7

Post by mcapra »

Closing this up
Former Nagios employee
https://www.mcapra.com/
Locked