Page 1 of 1

backup of configuration files of nagios core 3.2.3

Posted: Mon Mar 26, 2012 10:36 pm
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

Re: backup of configuration files of nagios core 3.2.3

Posted: Tue Mar 27, 2012 9:55 pm
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.

Re: backup of configuration files of nagios core 3.2.3

Posted: Tue Mar 27, 2012 11:16 pm
by Haidar
I have in server directory many files, so please can you provide the complete procedure to backup the config file

Re: backup of configuration files of nagios core 3.2.3

Posted: Wed Mar 28, 2012 5:51 pm
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.