Hello
@jolson, and welcome to the forums (for the first time ever I'm sure)!
Online vs offline should not matter as far as the database is concerned, and as long as the database is on your localhost there should not be too many issues. The backup and restore scripts (located under
/usr/local/nagiosxi/scripts/ named
backup_xi.sh and
restore_xi.sh respectively) were updated fairly recently to work directly through port 3306 (via a call to
mysqldump) as opposed to grabbing the MYI and MYD files directly, so that actually will work no matter where the database files are (local or remote). However, the
repair_databases.sh script (also located in
/usr/local/nagiosxi/scripts/) does still iterate over the MYI files via the
repairmysql.sh file as seen here:
Code: Select all
--- SNIP ---
echo "DATABASE: $db"
echo "TABLE: $table"
cmd="/usr/bin/myisamchk -r -f"
if [ "x$table" == "x" ]; then
t="*.MYI"
else
t=$table;
fi
dest="/var/lib/mysql/$db"
pushd $dest
ret=$?
if [ $ret -eq 0 ]; then
$BASEDIR/manage_services.sh stop mysqld
$cmd $t --sort_buffer_size=256M
$BASEDIR/manage_services.sh start mysqld
popd
else
echo "ERROR: Could not change to dir: $dest"
exit 1
fi
--- SNIP ---
So you will likely need to either modify the script to point from
/var/lib/mysql/ to
/usr/local/nagios/mysql/ (which will be overwritten on an update) or make a symlink to the correct directory.
This is the only script that I know will need to be changed, however there could be others so I would advise you to try this in a test environment first for a few days before moving to production. I'll also point out that we haven't tested this internally, so I cannot guarantee 100% functionality if these files are moved.
Let us know if you have any further questions, or if you run into any issues.