Page 1 of 3
Problems with scheduled backups
Posted: Sat Jun 02, 2018 2:18 pm
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
Re: Problems with scheduled backups
Posted: Mon Jun 04, 2018 1:43 pm
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).
Re: Problems with scheduled backups
Posted: Mon Jun 04, 2018 6:14 pm
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]
Re: Problems with scheduled backups
Posted: Tue Jun 05, 2018 11:40 am
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?
Re: Problems with scheduled backups
Posted: Tue Jun 05, 2018 12:23 pm
by smersh
Sure, I will do right now.
Will report tomorrow.
Regards!
Re: Problems with scheduled backups
Posted: Tue Jun 05, 2018 1:19 pm
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
Re: Problems with scheduled backups
Posted: Tue Jun 05, 2018 3:15 pm
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" ?
Re: Problems with scheduled backups
Posted: Tue Jun 05, 2018 4:39 pm
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
Re: Problems with scheduled backups
Posted: Wed Jun 06, 2018 10:39 am
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.
Re: Problems with scheduled backups
Posted: Wed Jun 06, 2018 1:34 pm
by smersh
Thanks, I'll do that,
But my system is in production, won't the new php file affect it?
NJ