backup not restored on Offloaded remote system

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ctrlshawkkey
Posts: 8
Joined: Thu Oct 17, 2013 5:02 am

backup not restored on Offloaded remote system

Post 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 .
You do not have the required permissions to view the files attached to this post.
ctrls.in
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: backup not restored on Offloaded remote system

Post 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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ctrlshawkkey
Posts: 8
Joined: Thu Oct 17, 2013 5:02 am

Re: backup not restored on Offloaded remote system

Post 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 ....
ctrls.in
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: backup not restored on Offloaded remote system

Post by lmiltchev »

I am glad I could help! :D
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked