Page 1 of 1

Host Migration to XI5 from 2014v2.7 - not in place upgrade

Posted: Fri Oct 23, 2015 9:52 am
by SteveBeauchemin
Has anyone done migration from Nagios XI 2014 version 2.7 to Nagios XI5 v2?

Not an upgrade in place, a migration from an old host to a new host.

I have a situation, sad story too, but I cannot do an in place upgrade.
I have a new, clean, Red Hat 7 installation, and I have installed XI5 there.
My old host is Red Hat 6.7 running Nagios 2014 v2.7
I need to get all my data moved ASAP. I thought I would have more time.

I have done this before using the backup_xi.sh and restore_xi.sh tools provided.
But that was same version to same version. This is a version change.

I cannot afford to make a mistake and I have no time to play on a crash
and burn system to do this. We are having storage issues under my old host
and I need to move off it quick. The VM architecture is having hardware problems,
vmotion is broken, and I need to get outa there before it truly fails. The vendor
is helping, but basically we need to get off the failing storage, and this is the path
we decided to take. Once again, I thought I would have more time.

So, is a backup and restore going to work going between versions. I know postgresql
and mariadb are part of the big change. Is there a written procedure for this or am
I going to have to run on a prayer with my fingers crossed.

No ones fault, just bad timing...

Help anyone?

Thanks

Steve B

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:30 am
by BanditBBS
Steve, can't you make the new box 2014r2.7, do the migration like you have in the past and then upgrade the new one to XI5.2.0?

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:36 am
by tmcdonald
Bandit is correct. You cannot backup a 2014 and restore it onto a fresh XI 5 that was not upgraded from 2014. The 2014 backup will have postgres, the clean XI 5 will not, so the restore will fail.

Backup your 2014, install a new 2014, then either restore and upgrade or upgrade and restore.

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:38 am
by SteveBeauchemin
Jim,

Are you trying to make sense again? I thought you were a Manager now. Did you skip the Management lobotomy?

But good idea, if that makes life easier for all concerned, maybe I should take that path.
About how long did your in place upgrade take? Moving from 2.7 to 5?

I am dealing with production, and I have a ton of App Owners who use NagVis all day long.
I am trying to minimize my outage window, and I need to make a guess at how long it will be offline.
Using other folks experiences and lessons learned just makes sense. that is why I'm haunting the forums these days.
I want to avoid as many problems as possible.

Thanks

Steve B

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:40 am
by BanditBBS
My upgrade from 2014r2.6 to 5.2.0 took less than 15 minutes, probably less than 10 and no real outage.

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:50 am
by SteveBeauchemin
Okay, I have multiple responses of the same basic flavor.
They make sense, and made me think about not rushing into trouble.

Basically, use the uninstall_xi.sh script on the XI5 system.
Download the 2014 latest installer and run it. Stay on 2014
for a couple days, maybe a week, and make sure the new system is okay.

It is an OS change from Red Hat 6 to 7 and it makes sense
to only introduce one major change at a time.

Schedule the XI5 upgrade for a later date so I can keep my down time to a minimum.

Thanks guys. I needed that reality check.

Steve B

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 10:51 am
by BanditBBS
That sounds good to me...the OS change *should* be ok as long as they are both 64 bit or both 32 bit.

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 12:40 pm
by lmiltchev
SteveBeauchemin, let us know if you get stuck on something. Good luck with the migration!

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 1:21 pm
by SteveBeauchemin
Thanks.

FYI - for other folks that might be taking the same path, I did need to make a change to the backup and restore scripts.
To migrate, I needed to include NagVis too. I modified the tools a little, not needed for XI5, but the 2014 files do not have NagVis included.

cd /usr/local/nagiosxi/scripts
vi backup_xi.sh

Add these lines after NRDP section

Code: Select all

echo "Backing up Nagvis..."
tar czfps $mydir/nagvis.tar.gz /usr/local/nagvis
and then
vi restore_xi.sh

Add these lines after NRDP section

Code: Select all

# NagVis
echo "Restoring NagVis backups..."
rm -rf /usr/local/nagvis
cd $rootdir && tar xzfps $backupdir/nagvis.tar.gz
Could have done it manually of course, but I liked this better so I don't have to remember additional steps later.
I will post other steps I had to take if it looks like they are worth sharing.
Maybe I can save someone else some time.

Steve B

Re: Host Migration to XI5 from 2014v2.7 - not in place upgra

Posted: Fri Oct 23, 2015 1:53 pm
by lmiltchev
Thanks for sharing, Steve!

FYI, I have one more line in my "restore_xi.sh" script:

Code: Select all

chown -R apache.apache /usr/local/nagvis