Backup Mechanisms

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Backup Mechanisms

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Mechanisms

Post by scottwilkerson »

We actually have a document outlining that
http://library.nagios.com/library/produ ... -nagios-xi
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Backup Mechanisms

Post 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.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Backup Mechanisms

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Backup Mechanisms

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Backup Mechanisms

Post by HAL »

Thanks for the information, let me see to it. Will get back to you in case of any further concerns.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Backup Mechanisms

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Backup Mechanisms

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Backup Mechanisms

Post 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.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: Backup Mechanisms

Post 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
Locked