backup of configuration files of nagios core 3.2.3

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Haidar
Posts: 4
Joined: Mon Mar 26, 2012 10:17 pm

backup of configuration files of nagios core 3.2.3

Post by Haidar »

Hello
I want to do backup (or import) for the configuration files of nagios core 3.2.3. Then export the configuration files to another linux server (similar functionality but not connected to existing one) CentOS release 5.6.

BR
Haidar
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: backup of configuration files of nagios core 3.2.3

Post by jsmurphy »

It should be as simple as zipping up the files in the objects directory (tar czf nagios.tgz /path/to/nagios/etc/objects/*) then using scp to copy them across and extract them back into the same place. Remember to check that your NSclient/NRPE configs have been updated if necessary.
Haidar
Posts: 4
Joined: Mon Mar 26, 2012 10:17 pm

Re: backup of configuration files of nagios core 3.2.3

Post by Haidar »

I have in server directory many files, so please can you provide the complete procedure to backup the config file
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: backup of configuration files of nagios core 3.2.3

Post by jsmurphy »

It should have many files... you will need them all. That is the complete procedure:
tar czf nagios.tgz /path/to/nagios/etc/objects/*
scp currentserver:/path/to/nagios.tgz user@remoteserver:/path/to/nagios/etc/objects/
tar xzf nagios.tgz on remote server
restart nagios on remote server (/etc/init.d/nagios restart)

Nagios is comprised of many flat config files.
Locked