Page 1 of 1

Upgrade CentOS 6.7 to CentOS 7

Posted: Tue Jun 21, 2016 2:04 am
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?

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Tue Jun 21, 2016 10:02 am
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!

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Tue Jun 21, 2016 11:11 am
by rkennedy
Can you verify this file exists and post the output? ls -l /store/backups/nagiosna/1466525262.tar.gz

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Wed Jun 22, 2016 3:56 am
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

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Wed Jun 22, 2016 4:02 am
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
===============

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Wed Jun 22, 2016 10:59 am
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?

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Thu Jun 23, 2016 1:26 am
by dcarballido
all good,
any question, thanks for support

Re: Upgrade CentOS 6.7 to CentOS 7

Posted: Thu Jun 23, 2016 9:35 am
by mcapra
Closing this up