Here is the output.
[
Code: Select all
nagios@lnxvnaghq001 nagiosxi]$ sudo /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/nagiosxi.1521830402.tar.gz
TS=1521838821
Extracting backup to /store/backups/nagiosxi/1521838821-restore...
In /store/backups/nagiosxi/1521838821-restore/nagiosxi.1521830402...
Backup files look okay. Preparing to restore...
Shutting down services...
Restoring directories to /...
Restoring Nagios Core...
rm: cannot remove ‘/usr/local/nagios’: Device or resource busy
Restoring Nagios XI...
Restoring NagiosQL...
Restoring NagiosQL backups...
Restoring NRDP backups...
Restoring MRTG...
Restoring Nagvis backups...
Restoring MySQL databases...
ERROR 1010 (HY000) at line 22: Error dropping database (can't rmdir './nagios', errno: 16)
Error restoring MySQL database 'nagios' - check the password in this script!
Please see attachment:
Help to get a clean restore would be appreciated
Some additional information.
One issue with the restore could be that to move nagios off the 'system' filesystems we gave them there own logical volume and mount point
F
Code: Select all
ilesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel_lnxvnaghq001-root 7.5G 3.4G 4.1G 46% /
devtmpfs 5.8G 0 5.8G 0% /dev
tmpfs 5.8G 0 5.8G 0% /dev/shm
tmpfs 5.8G 594M 5.3G 11% /run
tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
/dev/mapper/rhel_lnxvnaghq001-home 3.8G 300M 3.5G 8% /home
/dev/mapper/vg_nagios-lv_local_nagios 15G 4.0G 12G 27% /usr/local/nagios
/dev/mapper/rhel_lnxvnaghq001-patrol 1.4G 81M 1.3G 6% /patrol
/dev/sda1 473M 226M 248M 48% /boot
/dev/mapper/vg_nagios-lv_store 25G 7.1G 18G 29% /store
/dev/mapper/rhel_lnxvnaghq001-var 3.8G 3.1G 687M 82% /var
/dev/mapper/vg_nagios-lv_mysql_nagios 5.0G 33M 5.0G 1% /var/lib/mysql/nagios
tmpfs 1.2G 0 1.2G 0% /run/user/10009
tmpfs 1.2G 0 1.2G 0% /run/user/10016
tmpfs 1.2G 0 1.2G 0% /run/user/50966
tmpfs 1.2G 0 1.2G 0% /run/user/10017