Page 1 of 2

Backup Mechanisms

Posted: Fri Feb 01, 2013 5:55 am
by HAL
Hi,
We would like to setup backup mechanism for our Nagios XI in Redhat linux EL6 platform. Please do guide us with complete information in this regard. PFB few comments from my side.

1). What all files are required to be backed up from OS, Application and Database front.
2). What should be the frequency of backup routines like daily, weekly, monthly.
3). Recovery standard practices/approaches.
4). We would plan to take backup of required files from linux box to windows box based on defined frequency. Also can think about taking taking linux box VM backup as VM snapshot on a certain frequency like monthly....

Kindly see to the requirements and suggest.

Regards,
Sanjeev Rathi
+4792672751

Re: Backup Mechanisms

Posted: Fri Feb 01, 2013 8:21 am
by scottwilkerson
We actually have a document outlining that
http://library.nagios.com/library/produ ... -nagios-xi

Re: Backup Mechanisms

Posted: Fri Feb 01, 2013 8:52 am
by HAL
Hi,
That pdf document is already with us. Is that sufficient with respect to Application and its internal db backup/restore requirement, please advise.

Re: Backup Mechanisms

Posted: Fri Feb 01, 2013 10:15 am
by HAL
Also let me know about few more things like whether we need to place that backup_xi script under crontab with some frequently. I guess its not required, as I can see folders getting created like daily, weekly and so on, after executing the script. Please throw some light about script working, i mean things like default frequently, default mode like daily weekly etc. and about default retention.

Re: Backup Mechanisms

Posted: Fri Feb 01, 2013 10:16 am
by abrist
It is sufficient for the XI database, though you may want to copy the backup to another machine. You can also backup snapshots for a quicker recovery in a situation where you just need to restore the CCM config. The backup script does not run on its own unless you have cron'd it.

Re: Backup Mechanisms

Posted: Mon Feb 04, 2013 7:00 am
by HAL
Thanks for the information, let me see to it. Will get back to you in case of any further concerns.

Re: Backup Mechanisms

Posted: Mon Feb 04, 2013 8:55 am
by scottwilkerson
HAL,

One thing to note is that the full backup script isn't part of the cron backups, you would need to add this is you want them automatically generated.

Re: Backup Mechanisms

Posted: Mon Feb 04, 2013 10:04 am
by HAL
Hi,
Thats fine I will add it under cron to execute every sunday, PFB context for the same.
* 9 * * 0 root /usr/local/nagiosxi/scripts/backup_xi.sh >> /var/log/script_output.log 2>&1

I can transfer the /store/backups directory having sub directorires mysql, postgresql and nagiosxi to my windows share, should be fine. Towards restoration I can only see steps for restoration of nagiosxi application using /usr/local/nagiosxi/scripts/restore_xi.sh <backupfile.tar.gz>. What about the restoration steps invloved for databases mysql and postgresql, please comment on this too.

Re: Backup Mechanisms

Posted: Mon Feb 04, 2013 10:15 am
by slansing
Both backup and restore scripts include the databases:

Excerpt from: http://assets.nagios.com/downloads/nagi ... ing_XI.pdf
The restore script will restore the following components of NagiosXI (if these components exist, they will be deleted and/or overwritten):
• Nagios Core files (/usr/local/nagios)
• Nagios XI files (/usr/local/nagiosxi)
• NagiosQL files (/var/www/html/nagiosql and /etc/nagiosql)
• Select Apache config files (in /etc/httpd/conf.d)
• Select logrotate config files (in /etc/logrotate.d)
• Select MySQL databases (nagios and nagiosql)
• Select PostgresQL databases (nagiosxi)
They will be included in the original backup for your custom cron. Is that what you were asking? Or were you asking for an alternative method.

Re: Backup Mechanisms

Posted: Tue Feb 05, 2013 4:33 am
by HAL
Thanks for your response, just wanna confirm about one thing I should backup, should I backup all the three sub directories listed below or I can backup only the 1359731827.tar.gz getting generated under nagiosxi. I believe only the said tar.gz file should be sufficient for the purpose of backup and restore for application and databases. Kindly confirm.

[root@oslms018 ~]# cd /store/backups
[root@oslms018 backups]# ls -ltrh
total 12K
drwxr-xr-x 2 root root 4.0K Feb 4 13:34 nagiosxi
drwxr-xr-x 5 root root 4.0K Feb 5 07:00 mysql
drwxr-xr-x 5 root root 4.0K Feb 5 08:00 postgresql