Page 1 of 1

backup not restored on Offloaded remote system

Posted: Thu Mar 13, 2014 10:29 am
by ctrlshawkkey
Hi Team,

We have two systems installed NagiosXI and offloaded MySQL DB. ITs working fine, and backup is completing properly.

Backup script /usr/local/nagiosxi/scripts/backup_xi.sh
Restore script /usr/local/nagiosxi/scripts/restore_xi.sh


When we are using below command and restored backup its performed following things.

/usr/local/nagiosxi/scritps/restore_xi.sh /store/backup/nagiosxi/XXXXXX.tar.gz

DONE: Nagios Core files (/usr/local/nagios)
DONE: Nagios XI files (/usr/local/nagiosxi)
DONE: NagiosQL files (/var/www/html/nagiosql and /etc/nagiosql)
DONE: Select Apache config files (in /etc/httpd/conf.d)
DONE: Select logrotate config files (in /etc/logrotate.d)

NOT DONE :
Select MySQL databases (nagios and nagiosql) Not restored on remote system(offloaded)
(it seems it restored in local nagiosxi machine)
DONE: Select PostgresQL databases (nagiosxi)

IF backup scritp is taking complete backup along with mysql db which is offloaded, why it is not restored when we restored from the script.

Please check the backup and restore scrtip in attachment .

Re: backup not restored on Offloaded remote system

Posted: Thu Mar 13, 2014 11:26 am
by lmiltchev
You may want to try the following:

Run the following command on remote offloaded mysql server, replacing <IP_OF_NAGIOS_SERVER> with the actual IP.

Code: Select all

echo "GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_SERVER>' IDENTIFIED BY 'nagiosxi';"|mysql -p 
Unzip "restore_xi.zip" file to "/usr/local/nagiosxi/scripts" on the XI server.
restore_xi.zip
Let me know if this helped.

Re: backup not restored on Offloaded remote system

Posted: Thu Mar 13, 2014 12:55 pm
by ctrlshawkkey
Hi lmiltchev,

You are great. Thank you very much. Its working 100%.

I have dropped some tables from offloaded Mysql DB, and i tried restore. Its successfully restored along with MySQL database.

Thanks again. you can close it ....

Re: backup not restored on Offloaded remote system

Posted: Thu Mar 13, 2014 1:30 pm
by lmiltchev
I am glad I could help! :D