Академический Документы
Профессиональный Документы
Культура Документы
Target Audience
This document is intended for use by Nagios XI Administrators.
Version Requirements
The steps described in this documentation require that your Nagios XI installation be running 2009R1.2C or later. Previous versions of Nagios XI do not include the backup and restore scripts described in this document.
Creating A Backup
You can create a backup of your Nagios XI installation by running the following script as the root user: /usr/local/nagiosxi/scripts/backup_xi.sh Note: If you changed your MySQL root password to something different than nagiosxi (the default), you will need to edit the script and change the mysqlpass= definition found in the first few lines of the script. The backup script will save a copy of the following components of NagiosXI:
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)
The backup script will save backups in the /store/backups/nagiosxi directory. Backups names correspond to the Unix timestamp at the time the backups were created.
Archiving Backups
It is recommended that you save a copy of the backups that are created on an another server or backup medium. Although out of the scope of this document, we recommend using rsync to replicate the /store/backups directory of the Nagios XI server to another machine.
Nagios Enterprises, LLC P.O. Box 8154 Saint Paul, MN 55108 USA
Page 1
Copyright 2011 Nagios Enterprises, LLC Revision 1.0 March, 2012
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)
Things to Consider
If you are restoring a backup from a different OS version or architecture this can be a problem because the backup is overwriting the compiled binaries. A work around follows: If you still have the /tmp/nagiosxi install directory do the following: cd /tmp/nagiosxi rm -f installed.subcomponents ./A-subcomponents ./build-perms-bin If you have already deleted the /tmp/nagiosxi install directory do the following: cd /tmp wget http://assets.nagios.com/downloads/nagiosxi/xi-2011-latest.tar.gz tar xzf xi-2011-latest.tar.gz cd /tmp/nagiosxi touch installed.mrtg ./A-subcomponents ./build-perms-bin
Nagios Enterprises, LLC P.O. Box 8154 Saint Paul, MN 55108 USA
Page 2
Copyright 2011 Nagios Enterprises, LLC Revision 1.0 March, 2012