nagios backups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

nagios backups

Post by benhank »

Fellas
I have read the documentation, but I am a little confused about the nagios backup script. does running

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
perform a bare metal backup?
that is, after I reinstall the OS and Nagios, after I run that backup script will I have to do anything else, such as reinstall anything like pluginst, groups ect?
So for example, my network admin spider sense starts tingling, and I run that script, and archive the BU on a different machine.
I come in the next day and instead of seeing my server, I see a hand written note saying: "hah! hah! I stole your server."
Can I then reinstall the os and nagios, and use that backup to fully restore my setup?
If not is there a script or doc's that will show me how to recover from a situation like that?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios backups

Post by scottwilkerson »

benhank wrote:Can I then reinstall the os and nagios, and use that backup to fully restore my setup?
This is exactly what this is for. You would reinstall the OS (same arch as you had when you backed up) then reinstall Nagios XI.
Then you run

Code: Select all

/usr/local/nagiosxi/scripts/restore_xi.sh xxxx.tar.gz
This will restore all of your configurations/databases/plugins.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: nagios backups

Post by benhank »

thanks, I was asking because the last couple of restores I did had issues. But looking back that happened because we backed up on a 32bit (we didnt know) os and tried to restore on a 64bit.
you can close the topic and thanks. BTW i did the backup and restore and it worked.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: nagios backups

Post by benhank »

I spoke too soon =(. after doing the backup and restore to my new server, when i hit apply configuration, I get a configuration error, but the snapshot shows no errors. I even went into ccm and did a check configuration, but same thing 6 warnings 0 errors but apply config bombs out. I also checked the machine i'd just backed up, apply config works.
On the new server I changed the IP, but still no go.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios backups

Post by scottwilkerson »

This could be a couple things depending on what the error says.

Lets do the following, run

Code: Select all

rm -f /usr/local/nagiosxi/scripts/nagiosql.*
and adjust the max_execution time in your php.ini according to
http://support.nagios.com/wiki/index.ph ... _Completes
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios backups

Post by lmiltchev »

Since you've been changing architectures, have you followed the steps outlined in the "Things to consider" section of our Backing Up And Restoring XI document?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: nagios backups

Post by benhank »

sorry bro, for once I did the impossible,... I searched the forums and ended up at the F.A.Q:

Code: Select all

 Apply Configuration Page Stalls Out, Never Completes

If you attempt to Apply Configuration and you're seeing the following output:

 * Configuration submitted for processing...
 * Waiting for configuration verification.................. 

and the configuration never applies, the page may be timing out. If you've recently updated XI, try restarting the server first. If you're currently running Nagios XI 2011R1.3 there is a known bug that can cause this issue. You'll need to upgrade to the latest version to resolve the issue. If that does not resolve the issue, try editing the configuration for your PHP settings. Open /etc/php.ini file in a text editor and increase the following values.

Scroll all the way down to the bottom of the script, and remove a line that says:

 memory_limit = 64M      ; Increase the memory limit

Then scroll up to around line 300, and increase the numbers for the following configs.

 ;;;;;;;;;;;;;;;;;;;
 ; Resource Limits ;
 ;;;;;;;;;;;;;;;;;;;

 max_execution_time = 60     ; Maximum execution time of each script, in  seconds
 max_input_time = 60     ; Maximum amount of time each script may spend parsing request data
 memory_limit = 256M      ; Maximum amount of memory a script may consume 


After this, run:

 service httpd restart

Then I rebooted, and viola! all set!


you guys can lock this .
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked