I need some guidance. I’m trying to migrate to a new host and can’t use, at least I don’t see a path to use, the documented migration method. I’ve a support case on this that hasn’t helped me much. I’m hoping the community can assist.
My current server is CentOS 8. NOT stream! Running version 5.8.8. Also, the database is external.
My new host is Ubuntu 22. So, the oldest supported version is 5.9.0.
The issue in the way of using the documented method is that CentOS 8 doesn’t support an upgrade to 5.9.0. And before you ask, yes, I’ve tried.
What are the manual steps to migrate? Can I export the hosts, services, notifications, users, etc. and import them manually?
Pretend, for this exercise, backup is broken and restore isn’t an option.
Should I treat this like a fresh install, based on the old servers configuration, and accept the loss of historic data?
Can I point the new server to the existing database server? Will there need to be some scripts run to update the database server from a 5.8.8 framework to, say, 5.11.1?
I can make copies of the existing systems to test and validate. So please, suggest away!
Manual migration steps as I have no way to use automated migration
-
- Posts: 34
- Joined: Thu Oct 13, 2016 8:25 am
- Location: Remote
Re: Manual migration steps as I have no way to use automated migration
Here's how we do this kind of crufty drop/replace from one (old) server to another:
Find all the config files on the old box that Nagios uses (see below) and save them somewhere:
Now take that config.tar and scp it to your new box (like /tmp). The log in to the new box and untar all those config files into /usr/local/nagios/etc/import. This assumes that you have a fresh install of XI on the new box.
Now you can import those configs via:
This will import (and overwrite any existing config) the entries into the XI database and then kick out normal config files (similar to what you just tarred up).
It's not perfect, but it will get you 80% or more of the way there.
Find all the config files on the old box that Nagios uses (see below) and save them somewhere:
Code: Select all
# cd /tmp
# egrep "cfg_(file|dir)" /usr/local/nagios/etc/nagios.cfg | awk -F= '{print $NF}' | xargs tar cfv config.tar
Now you can import those configs via:
Code: Select all
# cd /usr/local/nagiosxi/scripts
# ./reconfigure_nagios.sh
It's not perfect, but it will get you 80% or more of the way there.