Problems with scheduled backups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Problems with scheduled backups

Post by smersh »

Hello,
I have a problem with scheduled backups. No backup is created if it's scheduled to anything later then a couple of minutes from the moment of setting it up. If the time to backup is short (less then 5 min), backup is created successfully!

Monitoring cmdsubsys.log shows nothing. The backup procedure just does not start.

Below is the scheduledbackups.log content.

Code: Select all

06-02-2018 17:00:02 DEBUG: Running scheduled local backup ....
06-02-2018 17:00:02 INFO: Creating a local backup: nagiosxi.1527944402
06-02-2018 17:00:02 DEBUG: Sending create local backup command to CmdSubsystem
Thank you,
Nick Jandieri
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Problems with scheduled backups

Post by cdienger »

What version of Xi is this? Was it working previously or did it just start failing? Are you scheduling a weekly backup to run on a certain day and time or a daily at a certain time? Please provide a screenshot of the scheduled backup settings as well as PM-ing me a copy of a profile(Admin > System Config > System Profile > Download System Profile).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Problems with scheduled backups

Post by smersh »

Hello,
1. It's 5.4.13
2. It was not working in a previous version.
3. Weekly backup. If it's scheduled to start within several minutes it works once. Does not work next week.
cdienger wrote:What version of Xi is this? Was it working previously or did it just start failing? Are you scheduling a weekly backup to run on a certain day and time or a daily at a certain time? Please provide a screenshot of the scheduled backup settings as well as PM-ing me a copy of a profile(Admin > System Config > System Profile > Download System Profile).
[img]Capture_bckp.PNG[/img]
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Problems with scheduled backups

Post by cdienger »

Thanks for the profile. So far I'm not seeing any problems and haven't been able to reproduce it yet. As a test, would be able to set it to daily and see if it triggers automatically in that situation?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Problems with scheduled backups

Post by smersh »

Sure, I will do right now.
Will report tomorrow.

Regards!
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Problems with scheduled backups

Post by smersh »

Ok, it was 9:30 PM when I have set the daily backup on 10:00 PM. Nothing at 10:00 PM. Let's wait 24 hours.

cmdsubsys.log - nothing new.

scheduledbackups.log
%
06-02-2018 17:00:02 DEBUG: Running scheduled local backup ...
06-02-2018 17:00:02 INFO: Creating a local backup: nagiosxi.1527944402
06-02-2018 17:00:02 DEBUG: Sending create local backup command to CmdSubsystem
06-05-2018 22:00:02 DEBUG: Running scheduled local backup ...
06-05-2018 22:00:02 INFO: Creating a local backup: nagiosxi.1528221602
06-05-2018 22:00:02 DEBUG: Sending create local backup command to CmdSubsystem
Is it possible that the time format which is not the same everywhere creates the problem? Check the screenshot, please.
nagios-backup-daily-1.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Problems with scheduled backups

Post by cdienger »

The timezone does seem odd. What do you have set under Admin > System Config > System Settings > General > Timezone? What is returned by "grep timezone /etc/php.ini" ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Problems with scheduled backups

Post by smersh »

cdienger wrote:The timezone does seem odd. What do you have set under Admin > System Config > System Settings > General > Timezone?
(UTC+04:00) Tbilisi
cdienger wrote:What is returned by "grep timezone /etc/php.ini" ?
[root@gnt-nagiosxi ~]# grep timezone /etc/php.ini
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Tbilisi
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Problems with scheduled backups

Post by cdienger »

Run the following from the command line:

echo "select * from xi_options where name='scheduled_local_backups';" | mysql -uroot -pnagiosxi -Dnagiosxi

This will return the time of the last and next runs. You can use https://www.epochconverter.com/ to convert the unix epoch time to a human readable one. Do these seem correct?

I've attach a copy of /usr/local/nagiosxi/html/includes/utils-commands.inc.php (attached here with a .txt extension. Rename it to a .inc.php) that we can use for debugging. Replace the current one(after making a backup of it) and make sure the permissions look like:

-rwxr-x--- 1 nagios nagios 36689 May 23 02:04 /usr/local/nagiosxi/html/includes/utils-commands.inc.php

and restart the httpd service:

service httpd restart

Then schedule another backup. When it fails, please PM /usr/local/nagiosxi/var/components/scheduledbackups.log as well as a copy of the logged events in Admin > System Information > Audit Log.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Problems with scheduled backups

Post by smersh »

Thanks, I'll do that,
But my system is in production, won't the new php file affect it?

NJ
Locked