Cold restore process

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Cold restore process

Post by bomahony »

Hey folks

I have a task next week to look into the cold restore for our environments XI's.

I had a look at:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

My task is to set a cold restore import nightly [we will want to increase thius later, but nightly will do for now]. Currently we back up to NFS from the active nodes, one NFS share per site. I will be installing our backup nodes next week with the same versions, and testing importing the data. However my query on this, is there a way to do the restore but have all checks [or even engine] disabled? The primary will still be live, and I dont want it going off like a cut snake and flooding each site with another 20K checks. Or alternatively a way to disable them from the CLI before/after restore to go with the cron i will implementing.

My other few queries were:
1. Does the backup schedule get imported? If so, is there a CLI command to delete it? We dont want our nightly backups getting over written! Or alternatively a way to have the backups include the hostname.
2. Hostnames are differnt. I assume this wont matter? [remote nrpe configs have both hosts allowed access on port5666]

Thanks again for the support
B
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold restore process

Post by benjaminsmith »

@bomahony, If you don't want your backup XI server to check any hosts and services you can make the following changes to the /usr/local/nagios/etc/nagios.cfg file:
enable_notifications=0
execute_service_checks=0
execute_host_checks=0
enable_event_handlers=0
Then you need to restart the nagios process to apply changes.

You can either do it on a new server right after the restore or you can change these settings on the production XI server, then take a backup and restore. That way backup will contain modified settings. But either way works fine.

You can also simply disable active checks and notifications on the backup server from the GUI (see image).

Lastly, you can enable or disable backups from web interface or backup settings are stored in the nagiosxi database in the xi_options table. So if you want to remove the scheduled backup entry from the inactive server, you could run a query to delete those values.

Sample Command ( test before using )

Code: Select all

echo "UPDATE nagiosxi.xi_options set xi_options.value = null WHERE xi_options.name = 'scheduled_ssh_backups';" | mysql -u root -pnagiosxi nagiosxi
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Cold restore process

Post by bomahony »

Thanks mate. I reckon ill do it all on the backup server. I have a Change request in for next thurs, so can we leave this open until then, in case i have further queries? Thanks.
B
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold restore process

Post by benjaminsmith »

Hello @bomahony,
Thanks mate. I reckon ill do it all on the backup server. I have a Change request in for next thurs, so can we leave this open until then, in case i have further queries? Thanks.
No problem. Let us know if you have any other questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Cold restore process

Post by bomahony »

Change just got approved for pre-prod next week and prod thefollowing week, so ill let you know once i have done one or two instances and let them settle in.

B
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold restore process

Post by benjaminsmith »

Sounds good.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Cold restore process

Post by bomahony »

Hey folks, this worked perfectly. I wrote an ansible play to install latest from web and a cron job to import last nights backup. It thankfully imported license, users, ldap users and perfdata.
Only doen it in my preprod env for now, as I need to wait till next week for prod, but you can close this off cheers
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold restore process

Post by benjaminsmith »

Hi @bomahony,

Thanks for the update! We'll mark this one as closed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked