[root@cvrmnagiosxi001 nagiosxi]# tail -f /usr/local/nagiosxi/var/components/scheduledbackups.log
08-22-2019 07:20:15 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist
08-23-2019 07:20:17 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist
08-24-2019 07:20:09 ERROR: Scheduled SSH Backup Failed: Local file to transfer does not exist
we are able to test connection and test SCP transfer and it worked fine without any issue.
Remote ssh server has disk space as well, port 22 is open.
/etc/sudoers , i see the backup line (/usr/local/nagiosxi/scripts/backup_xi.sh) included as well.
remote directory has below permissions:
drwxr-xr-x 2 nagios nagios 242 Aug 26 09:14 nagios_backups
remote server is ping-able and we are able to scp the file manually to the remote server
manually able to take the local backups
any help would be appreciated.
SSH backups are failing
Re: SSH backups are failing
This is a little strange. Nagios shouldn't be keeping a local file after the backup process is complete, if you only have SSH backups enabled. Do you have Local Backups enabled as well? If so, are they set for the same time as the SSH Backups?
I'm wondering if we're running into a situation where the backup file isn't read by the time the script tries to SCP the file off the system. Can you modify the scheduled time of the SSH Backups by +5 minutes?
I'm wondering if we're running into a situation where the backup file isn't read by the time the script tries to SCP the file off the system. Can you modify the scheduled time of the SSH Backups by +5 minutes?
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: SSH backups are failing
Actually, I just noticed something that may be the issue. All of your backups are failing at 7:20AM + a handful of seconds. The backup timeout defaults to 20 minutes, so what's probably happening is the script responsible for making the backup file is timing out, and the script that's responsible for transferring it doesn't know that the previous script failed.
Let's go right to changing the backup timeout setting.
Use your favorite editor to edit the file /usr/local/nagiosxi/html/config.inc.php
Find an empty line in that file and add the following
That increases the execution time from the default 20 minutes, to 30 minutes. You can increase this as much as you like, up to 60 minutes. If you need to go beyond 60 minutes, we will need to alter PHP's max execution time.
Let's go right to changing the backup timeout setting.
Use your favorite editor to edit the file /usr/local/nagiosxi/html/config.inc.php
Find an empty line in that file and add the following
Code: Select all
$cfg['backup_timeout'] = 1800As 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
IT-OPS-SYS
- Posts: 184
- Joined: Sun Jan 07, 2018 12:56 pm
Re: SSH backups are failing
there should be ; after the command like below
$cfg['backup_timeout'] = 1800 ;
made the changes and the issue got fixed.
$cfg['backup_timeout'] = 1800 ;
made the changes and the issue got fixed.
Re: SSH backups are failing
Excellent catch, thank you! Also glad to hear it's working now. Closing thread.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SSH backups are failing
That is correct and glad you caught it!IT-OPS-SYS wrote:there should be ; after the command like below
$cfg['backup_timeout'] = 1800 ;
made the changes and the issue got fixed.
Locking thread