©XSIBackup-Free: Free Backup Software for ©VMWare ©ESXi

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2019-11-22 16:01:23

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

DOW crontab entries execute daily

Hi,

I'm using XSIBACKUP-PRO 11.2.10 and the crontab file below to schedule 2 backup jobs:

001: Full backup of all VMs using Vmkfstools every Sunday
002: Incremental backup of all running VMs using OneDiff Monday through Saturday

For some reason, both jobs run every day and I don't understand why? Neither of the jobs is chained to the other. I hope for a simple user error on my side which a few extra pair of eyes can help me pinpoint.

These are my job configs and crontab:

001:

[root@matterhorn:~] cat /vmfs/volumes/datastore5/xsi-dir/jobs/001
"/vmfs/volumes/datastore5/xsi-dir/xsibackup" \
--backup-prog=Vmkfstools \
--snapshot=includememory \
--backup-point=/vmfs/volumes/datastore5/matterhorn/full \
--backup-type=All \
--backup-how=Hot \
--use-smtp=1 \
--mail-to=vscheuber@gmail.com \
--backup-id=001 \
--description="All VMs" \
--date-dir=yes \
--backup-room=5000 \
--exec=yes >> "/vmfs/volumes/datastore5/xsi-dir/var/logs/xsibackup.log"

002:

[root@matterhorn:~] cat /vmfs/volumes/datastore5/xsi-dir/jobs/002
"/vmfs/volumes/datastore5/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--snapshot=includememory \
--backup-point=/vmfs/volumes/datastore5/matterhorn/incremental \
--backup-type=Running \
--backup-how=Hot \
--use-smtp=1 \
--mail-to=vscheuber@gmail.com \
--backup-id=002 \
--description="Running VMs" \
--exec=yes >> "/vmfs/volumes/datastore5/xsi-dir/var/logs/xsibackup.log"

Crontab:

[root@matterhorn:~] cat /var/spool/cron/crontabs/root 
#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
30 8 * * 1-6 "/vmfs/volumes/datastore5/xsi-dir/jobs/002" # Added by XSIBackup
30 8 * * 7 "/vmfs/volumes/datastore5/xsi-dir/jobs/001" # Added by XSIBackup

Does anything jump the eye as to why both my jobs execute?

Thank y'all!

Offline

#2 2019-11-22 16:53:40

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

Re: DOW crontab entries execute daily

Here is the log entry, they both start at the same time and of course interfere with each other, so both complete with errors:

2019-11-22T08:30:06|  ###############################################################################
2019-11-22T08:30:06|     XSIBACKUP-PRO 11.2.10: new execution request                     
2019-11-22T08:30:06|  ###############################################################################
2019-11-22T08:30:06|  
2019-11-22T08:30:06|  ###############################################################################
2019-11-22T08:30:06|     XSIBACKUP-PRO 11.2.10: new execution request                     
2019-11-22T08:30:06|  ###############################################################################
2019-11-22T08:30:06|  
2019-11-22T08:30:06|  NOTICE: (c) XSIBackup kills any user launched jobs, make sure you don't overlap manual jobs
---------------------------------------------------------------------------------------------------------------------------------
2019-11-22T08:30:06|  NOTICE: (c) XSIBackup kills any user launched jobs, make sure you don't overlap manual jobs
---------------------------------------------------------------------------------------------------------------------------------
XSIBackup PID:          2340148                               matterhorn.yyy.zzz
Fri, 22 Nov 2019 08:30:06 +0000                                IPv4: aaa.bbb.ccc.ddd/255.255.255.0
VMware ESXi 6.7.0 build-10302608                              (c) Rsync 3.1.0 as opt. dependency
---------------------------------------------------------------------------------------------------------------------------------
Backup Id:                  002XSIBackup PID:          2340147                               matterhorn.yyy.zzz
Fri, 22 Nov 2019 08:30:06 +0000                                IPv4: aaa.bbb.ccc.ddd/255.255.255.0
VMware ESXi 6.7.0 build-10302608                              (c) Rsync 3.1.0 as opt. dependency
---------------------------------------------------------------------------------------------------------------------------------
Backup Id:                  001                        Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz 
---------------------------------------------------------------------------                        Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz 
----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------

Offline

#3 2019-11-22 19:23:27

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

Re: DOW crontab entries execute daily

OK, I researched this further and it appears as if busybox cron doesn't support "7" for Sunday, only "0". At least that's what this thread indicates:

https://communities.vmware.com/thread/342106

So I will change my crontab to use "0" instead of "7" for Sunday and hopefully my jobs will no longer overlap.

Offline

#4 2019-11-22 20:38:02

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

Re: DOW crontab entries execute daily

@Admin, I think it would help all of us newbies if on this page the tool would call out that "7" should be avoided for the DOW:

┌───────────────────────────────────────────────────────────────────────────────────────┐
│ Enter the values for the cron schedule, as you would do in any crontab, i.e.:         │
│                                                                                       │
│ Example 1: 30   2   *   *   *        (daily job at 02:30 am)                          │
│ Example 2: 10   14   *   *   1,3,5   (job at 14:10 on M, X and F)                     │
│ Example 3: 47   8   1,15   *   *     (job at 08:47 every 1st & 15th day of month)     │
│                                                                                       │
│ Be careful not to overlap jobs by setting them too close in time                      │
│ Use job chains to ensure overlap does not occur when combining them                   │
│ Set all time fields to asterisk (*) to remove the job from the cron                   │
│                                                                                       │
│ Current time is: Fri Nov 22 20:30:10 UTC 2019                                         │
│ ┌───────────────────────────────────────────────────────────────────────────────────┐ │
│ │ Minute     Hour       Day        Month      Weekday    BackupId                   │ │
│ │                                                                                   │ │
│ │ 30         8          *          *          0          001                        │ │
│ │                                                                                   │ │
│ └───────────────────────────────────────────────────────────────────────────────────┘ │
├───────────────────────────────────────────────────────────────────────────────────────┤
│                           <  OK  >              <Cancel>                              │
└───────────────────────────────────────────────────────────────────────────────────────┘

I know this is not an XSIBackup limitation but since your software relies on the crontab provided by ESXi, this callout might save others shave hours or days off the learning curve.

Cheers!

Offline

Board footer