How to backup and restore XI to the new host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

How to backup and restore XI to the new host

Post by dlukinski »

Hello XI support

How to backup and restore XI tot he new host (inlcuding all PHP, NRPE, BPI customizations, perf data, etc?)

- we are migrating from the old (CentOS 6) to the new OVA (CentOS 7), also migration from postgre to MySQL.

Would standard backup cover the customizations, or is there a list of directories to pickup?
- BPI / PHP/ NRPE
- custom plugins
- perf data
- else

Thank you
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

Re: How to backup and restore XI to the new host

Post by jdunitz »

This document might be helpful:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

As long as your customizations are in the standard locations and you haven't added files outside those directories, you should be fine.

You can always verify that your customizations are being backed up by doing a backup, then unpacking it like this and looking for your items:

Code: Select all

[root@jpd-nagiosxi-one nagiosxi]#  cd /store/backups/nagiosxi
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# tar -xzf 1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# cd 1591034626
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d              httpd        mysql            nrdp.tar.gz
cron                logrotate    nagios.tar.gz    usr-share-snmp.tar.gz
etc-snmp.tar.gz     mrtg.cfg     nagiosxi.tar.gz
home-nagios.tar.gz  mrtg.tar.gz  nagvis.tar.gz
[root@jpd-nagiosxi-one 1591034626]# for file in *gz
> do
> tar -xzf $file
> done
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d           home-nagios.tar.gz  mysql            usr
cron             httpd               nagios.tar.gz    usr-share-snmp.tar.gz
etc              logrotate           nagiosxi.tar.gz  var
etc-snmp.tar.gz  mrtg.cfg            nagvis.tar.gz
home             mrtg.tar.gz         nrdp.tar.gz
[root@jpd-nagiosxi-one 1591034626]#
Now your whole XI structure is unpacked inside the backup directory, and you can look for what you need. Keep in mind that this unpacks to over a gigabyte, so if you're short on space, be careful.

Hope that's helpful!

--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: How to backup and restore XI to the new host

Post by dlukinski »

jdunitz wrote:This document might be helpful:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

As long as your customizations are in the standard locations and you haven't added files outside those directories, you should be fine.

You can always verify that your customizations are being backed up by doing a backup, then unpacking it like this and looking for your items:

Code: Select all

[root@jpd-nagiosxi-one nagiosxi]#  cd /store/backups/nagiosxi
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# tar -xzf 1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# cd 1591034626
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d              httpd        mysql            nrdp.tar.gz
cron                logrotate    nagios.tar.gz    usr-share-snmp.tar.gz
etc-snmp.tar.gz     mrtg.cfg     nagiosxi.tar.gz
home-nagios.tar.gz  mrtg.tar.gz  nagvis.tar.gz
[root@jpd-nagiosxi-one 1591034626]# for file in *gz
> do
> tar -xzf $file
> done
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d           home-nagios.tar.gz  mysql            usr
cron             httpd               nagios.tar.gz    usr-share-snmp.tar.gz
etc              logrotate           nagiosxi.tar.gz  var
etc-snmp.tar.gz  mrtg.cfg            nagvis.tar.gz
home             mrtg.tar.gz         nrdp.tar.gz
[root@jpd-nagiosxi-one 1591034626]#
Now your whole XI structure is unpacked inside the backup directory, and you can look for what you need. Keep in mind that this unpacks to over a gigabyte, so if you're short on space, be careful.

Hope that's helpful!

--Jeffrey
Thank you,
Please close the thread (We've migrated now)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to backup and restore XI to the new host

Post by scottwilkerson »

dlukinski wrote:
jdunitz wrote:This document might be helpful:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

As long as your customizations are in the standard locations and you haven't added files outside those directories, you should be fine.

You can always verify that your customizations are being backed up by doing a backup, then unpacking it like this and looking for your items:

Code: Select all

[root@jpd-nagiosxi-one nagiosxi]#  cd /store/backups/nagiosxi
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# tar -xzf 1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# ls
1585772763.tar.gz  1591034626  1591034626.tar.gz
[root@jpd-nagiosxi-one nagiosxi]# cd 1591034626
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d              httpd        mysql            nrdp.tar.gz
cron                logrotate    nagios.tar.gz    usr-share-snmp.tar.gz
etc-snmp.tar.gz     mrtg.cfg     nagiosxi.tar.gz
home-nagios.tar.gz  mrtg.tar.gz  nagvis.tar.gz
[root@jpd-nagiosxi-one 1591034626]# for file in *gz
> do
> tar -xzf $file
> done
[root@jpd-nagiosxi-one 1591034626]# ls
conf.d           home-nagios.tar.gz  mysql            usr
cron             httpd               nagios.tar.gz    usr-share-snmp.tar.gz
etc              logrotate           nagiosxi.tar.gz  var
etc-snmp.tar.gz  mrtg.cfg            nagvis.tar.gz
home             mrtg.tar.gz         nrdp.tar.gz
[root@jpd-nagiosxi-one 1591034626]#
Now your whole XI structure is unpacked inside the backup directory, and you can look for what you need. Keep in mind that this unpacks to over a gigabyte, so if you're short on space, be careful.

Hope that's helpful!

--Jeffrey
Thank you,
Please close the thread (We've migrated now)
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked