Page 1 of 1

backups

Posted: Wed Jan 02, 2019 3:37 pm
by Maxwellb99
Hello,

Please help me troubleshoot backups. I'm trying to save off a backup every day for a week. So, in my estimation. It looks like Nagios 'thinks' it's saving off a copy of the backup nightly, & I tested ssh'ing a file over, that seems to work. However, the last backups are from the end of August. What's our play in remediating this?
Nagios_gui_backup.PNG
Nagios_backup.PNG
Thanks,
Maxwell Ramirez

Re: backups

Posted: Wed Jan 02, 2019 4:03 pm
by tgriep
First, follow this article to enable debugging to the scheduled backup logs.
https://support.nagios.com/kb/article/n ... l-578.html

Code: Select all

After the change, wait for the next scheduled backup to happen and check the log file for any errors.
/usr/local/nagiosxi/var/components/scheduledbackups.log
If you can resolve the error, do so or post the messages here so we can help troubleshoot the issue.

Also, what version of Nagios XI are you running on the server as well as the OS and release version?

Re: backups

Posted: Wed Jan 02, 2019 8:27 pm
by Maxwellb99
Hello,

The good: I exported a backup of a test Nagios instances that was fully up-to-date & had only localhost. Further, I was able to ssh another Nagios instance with hosts & services running 5.5.3 (NOTE: this instance is less than a gig in size). The only change I made was changing the scheduled time from 01:30 to 17:40.
bar.PNG
The Bad: This Nagios instance, the original questionable one. Running 5.5.3. It's 2.14 GB
It's been like this for over an hour.

tail -f /usr/local/nagiosxi/var/components/scheduledbackups.log
01-02-2019 17:00:01 DEBUG: Running scheduled SSH backup ...
01-02-2019 17:00:01 DEBUG: Sending create local backup command to CmdSubsystem
01-02-2019 17:09:34 INFO: Scheduled SSH Backup: Removing file nagiosxi.1534748401.tar.gz
01-02-2019 17:09:34 INFO: Scheduled SSH Backup: Removing file nagiosxi.1534834801.tar.gz

I'm going to enable debugging for all my instances, & reset the scheduled run-time. In the morning we'll see where they're at & upgrade to the latest instance of Nagios.

Thoughts?

Re: backups

Posted: Thu Jan 03, 2019 11:29 am
by tgriep
When the backup ran, did it remove the backups from the remote sftp server like the logs said?

When doing a ssh backup, the system creates a local copy of the file in this folder on the Nagios server.

Code: Select all

/store/backups/nagiosxi
When the backup is finishes, it transfers it to the remote server and then deletes the local copy.

Can you schedule the backup again and monitor that folder to see if the system is creating the local copy of the file and report back here is it looks like it is?

Please run this command on the server in question and post the output here so we can view the contents of that folder.

Code: Select all

ls -l  /store/backups/nagiosxi
Another thing, the backup has a default timeout of 20 minutes and it could be timing out.

This value can be increased by editing the /usr/local/nagiosxi/html/config.inc.php file and adding the following to the bottom

Code: Select all

$cfg['backup_timeout'] = 3600;
Save the file and restart the following processes to make sure the change is updated.

Code: Select all

service nagios restart
service httpd restart
That will increase the timeout to 60 minutes.
See if that solves the issue.