#1 2018-12-12 18:23:05

lmasarati
Member
Registered: 2018-04-30
Posts: 4

cron jobs running on wrong day?

Hello,
I recently updated xsibackup pro from a pre-gui version (10.3.3) to the last one (11.1.7).
During upgrade I reconfigured the 2 scheduled backup jobs: first one (001) is for daily backup of all the running VMs every day excluding Sunday, second one (002) is for weekly backup of all the VMs only on Sunday.
Now the problem is that the weekly backup is run everyday even if it should run just on day 7 (Sunday, isn't it?); I also suspect that the daily backup would run also on Sunday...
I cannot see where is the problem.

Output of the command: /vmfs/volumes/datastore1/xsi-dir/xsibackup --update-cron

-----------------------------------------------------------------------------------------------------------------------------------
The root user crontab has been succesfully updated
-----------------------------------------------------------------------------------------------------------------------------------
This is the current content of the root crontab
-----------------------------------------------------------------------------------------------------------------------------------
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5  *    *   *   *   /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh
00   1    *   *   *   localcli storage core device purge
0    3    *   *   7   /vmfs/volumes/datastore1/xsi-dir/jobs/002 # Added by XSIBackup
0    1    *   *   1,2,3,4,5   /vmfs/volumes/datastore1/xsi-dir/jobs/001 # Added by XSIBackup
-----------------------------------------------------------------------------------------------------------------------------------
Current number of crond instances is 1, service seems to be running O.K.
-----------------------------------------------------------------------------------------------------------------------------------


Content of the /vmfs/volumes/datastore1/xsi-dir/jobs/001 file

"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=vmkfstools \
--snapshot=includememory \
--date-dir=yes \
--backup-point=/vmfs/volumes/freenas/esxi-backup \
--backup-type=Running \
--backup-how=Hot \
--backup-room=7000 \
--use-smtp=2 \
--mail-to=*hidden* \
--subject="ESXi Daily Backup report" \
--backup-id=001 \
--description="Daily Backup" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"


Content of the /vmfs/volumes/datastore1/xsi-dir/jobs/002 file

"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=Vmkfstools \
--snapshot=includememory \
--date-dir=yes \
--backup-point=/vmfs/volumes/freenas/esxi-week-backup \
--backup-type=All \
--backup-how=Hot \
--backup-room=7000 \
--use-smtp=2 \
--mail-to=*hidden* \
--subject="ESXi Weekly Backup report" \
--backup-id=002 \
--description="Weekly Backup" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"


Content of the xsibackup.log file:

[...]
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:05|  ###############################################################################
2018-12-12T01:00:05|     XSIBACKUP-PRO 11.1.7: new execution request
2018-12-12T01:00:05|  ###############################################################################
2018-12-12T01:00:05|
2018-12-12T01:00:06|  NOTICE: (c) XSIBackup kills any user launched jobs, make sure you don't overlap manual jobs
---------------------------------------------------------------------------------------------------------------------------------
XSIBackup PID:        163266684                                            *hidden*
Wed, 12 Dec 2018 01:00:06 +0000                              IPv4: 192.168.127.58/255.255.255.0
VMware ESXi 6.7.0 build-8169922                              (c) Rsync 3.1.0 as opt. dependency
---------------------------------------------------------------------------------------------------------------------------------
Backup Id:                  001                 Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:06|  Backup description: Daily Backup
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:06|  Message: crontab is installed for user root
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:08|  Backup user is: root
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:08|  Backup program is: vmkfstools
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:08|  --backup-point found at /vmfs/volumes/freenas/esxi-backup (filesystem: VMFS-5)
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:08|  The backup room has been limited to 7000 gb.
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T01:00:09|  Getting list of all VMs...
---------------------------------------------------------------------------------------------------------------------------------
[...]
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:05|  ###############################################################################
2018-12-12T03:00:05|     XSIBACKUP-PRO 11.1.7: new execution request
2018-12-12T03:00:05|  ###############################################################################
2018-12-12T03:00:05|
2018-12-12T03:00:06|  NOTICE: (c) XSIBackup kills any user launched jobs, make sure you don't overlap manual jobs
---------------------------------------------------------------------------------------------------------------------------------
XSIBackup PID:        163303153                                            *hidden*
Wed, 12 Dec 2018 03:00:05 +0000                              IPv4: 192.168.127.58/255.255.255.0
VMware ESXi 6.7.0 build-8169922                              (c) Rsync 3.1.0 as opt. dependency
---------------------------------------------------------------------------------------------------------------------------------
Backup Id:                  002                 Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:06|  Backup description: Weekly Backup
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:06|  Message: crontab is installed for user root
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:08|  Backup user is: root
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:08|  Backup program is: vmkfstools
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:08|  --backup-point found at /vmfs/volumes/freenas/esxi-week-backup (filesystem: VMFS-5)
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:08|  The backup room has been limited to 7000 gb.
---------------------------------------------------------------------------------------------------------------------------------
2018-12-12T03:00:09|  Getting list of all VMs...
---------------------------------------------------------------------------------------------------------------------------------
[...]

Offline

#2 2018-12-13 10:37:51

lmasarati
Member
Registered: 2018-04-30
Posts: 4

Re: cron jobs running on wrong day?

I changed the weekly backup job in crontab from day 7 to day 0 and it did not run today, maybe the problem was only this?

Offline

#3 2018-12-13 12:11:15

admin
Administrator
Registered: 2017-04-21
Posts: 1,366

Re: cron jobs running on wrong day?

I guess the days of week have 0 base
You should upgrade to 11.1.9 that will be launched today, should you use the GUI to run jobs or check servers per instance. There is a bug that prevents this operations from completing.

Offline

#4 2019-11-22 23:50:55

vscheuber
Member
Registered: 2019-11-18
Posts: 10

Re: cron jobs running on wrong day?

@lmasarati I know this is an old thread but still wanted to inquire if you ended up figuring this out? I just discovered this thread after creating a very similar one myself. I believe I found the solution. Here is the new thread:

http://33hops.com/forum/viewtopic.php?id=609

Offline

Board footer