Ok,
So I have two datacenters. In City1 my production nagios and production offloaded DB/NDO2DB server reside. In City2 I have a DR XI server just sitting there doing nothing. I have a folder being rsynced between the two that contains the daily backups from City1. I use rsync instead of the ssh or ftp so I can limit the bw utilization and so only one backup is being compressed up.
My question here is...if I have a failure of City1 datacenter and we make the decision to bring up the XI server in City2, what kind of issue is that going to bring up since the configs are set to go to a remote DB server and for NDO2DB not to be running locally?
Will I have to modify the backup file and undo the offloading steps before I run the restore_xi.sh script so it attaches to the local DB in City2?
Quick DR question
Quick DR question
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Quick DR question
From reading the restore_xi.sh script and from my testing, I have validate that these things are true:
1. The restore_xi.sh script will use your current city2 DB configuration (localhost) and restore the DB to the localhost.
2. During the restore it will revert these files that will re-setup your offloaded configuration:
3. It will revert the rest of your config files (nagios.cfg, etc)
4. It will even revert your restore_xi.sh script and undo any changes that you might want to make to overcome these issues.
5. At the end of the script it will restart the services and will try to connect to the offloaded DB.
So knowing this, here is what you would need to do:
Create a directory that you will copy in any of your configuration files that you want to keep and copy those files in there:
Run the restore.
Stop the services:
Copy the files back:
Start the services:
1. The restore_xi.sh script will use your current city2 DB configuration (localhost) and restore the DB to the localhost.
2. During the restore it will revert these files that will re-setup your offloaded configuration:
Code: Select all
/usr/local/nagios/etc/ndo2db.cfg
/usr/local/nagiosxi/html/config.inc.php
/var/www/html/nagiosql/config/settings.php
4. It will even revert your restore_xi.sh script and undo any changes that you might want to make to overcome these issues.
5. At the end of the script it will restart the services and will try to connect to the offloaded DB.
So knowing this, here is what you would need to do:
Create a directory that you will copy in any of your configuration files that you want to keep and copy those files in there:
Code: Select all
mkdir /mylocalhostconfigs
cp /usr/local/nagios/etc/ndo2db.cfg /usr/local/nagiosxi/html/config.inc.php /var/www/html/nagiosql/config/settings.php /mylocalhostconfigsStop the services:
Code: Select all
/etc/init.d/httpd stop
/etc/init.d/npcd stop
/etc/init.d/ndo2db stop
/etc/init.d/nagiosxi stop
/etc/init.d/nagios stopCode: Select all
cp /mylocalhostconfigs/ndo2db.cfg /usr/local/nagios/etc/ndo2db.cfg
cp /mylocalhostconfigs/config.inc.php /usr/local/nagiosxi/html/config.inc.php
cp /mylocalhostconfigs/settings.php /var/www/html/nagiosql/config/settings.phpCode: Select all
/etc/init.d/httpd start
/etc/init.d/npcd start
/etc/init.d/ndo2db start
/etc/init.d/nagiosxi start
/etc/init.d/nagios startRe: Quick DR question
ssax,
That's perfect! Now I don't have to document it
Close this up and thanks!
That's perfect! Now I don't have to document it
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github