Page 1 of 1

Nagios installed in custom location and backup_xi.sh

Posted: Wed Oct 24, 2018 11:04 am
by kg4afy
Sorry if this is posted somewhere, I didn't see it.

So this isn't much of a support question as it is a suggestion for those who need help with using backup_xi.sh when installing Nagios in a different location (whether you are clustering with DRBD / Pacemaker or whatever).

In my installation, I have Nagios installed in a folder named /drbd (/drbd/nagios, /drbd/nagiosxi, etc) and I have symbolic links set up under /usr/local. This works great, but noticed that inside backup_xi.sh, the use of "tar" doesn't deference symbolic links, and therefore doesn't backup any of the files. The resolution for me was to add "h" to the tar commands, for example:

tar czfph $mydir/nagiosxi.tar.gz /usr/local/nagiosxi

Re: Nagios installed in custom location and backup_xi.sh

Posted: Wed Oct 24, 2018 4:44 pm
by npolovenko
Thanks for sharing the solution with us, @kg4afy! I will keep this in mind as well and reference this thread if someone else comes with a similar problem.