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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2019-03-18 22:55:31

NextLevel
Member
Registered: 2019-03-11
Posts: 33

Cronjob only executes the --on-error part of the job

I have just one single job as follows:

"/vmfs/volumes/vSphere_Backups/xsi-dir/xsibackup" \
--backup-prog=XSITools:z \
--snapshot=doquiesce \
--backup-point=/vmfs/volumes/vSphere_Backups/XSI \
--backup-type=Running \
--backup-how=Hot \
--use-smtp=2 \
--mail-to=****@****.com \
--backup-id=010 \
--description="All running VMs" \
--del-dirs=+30d \
--img-list="none|none|none|none|none|none" \
--on-error="execProg->/vmfs/volumes/vSphere_Backups/xsi-dir/xsibackup --check-xsitoolsrepo=/vmfs/volumes/vSphere_Backups/XSI:f --mail-to=mymail@mail.com" \
--exec=yes >> "/vmfs/volumes/vSphere_Backups/xsi-dir/xsibackup-$(hostname -s).log"

If I start the job manually (Using the GUI Running a backup job) everything works fine.

I put this job in the crontab:

01 22 * * 1-5 "/vmfs/volumes/vSphere_Backups/xsi-dir/jobs/010"

It is also correcly copied to the esxi crontab in /var/spool/cron/crontabs

But when it runs from the scheduler it just executes the --on-error part, while there is nothing in the log that indicates an error:

---------------------------------------------------------------------------------------------------------------------------------
2019-03-18T22:01:05|  ###############################################################################
2019-03-18T22:01:05|     XSIBACKUP-PRO 11.2.3: new execution request
2019-03-18T22:01:05|  ###############################################################################
2019-03-18T22:01:05|
Performing fast check on (c)XSITools repo
---------------------------------------------------------------------------------------------------------------------------------
2019-03-18T22:01:05|  </vmfs/volumes/vSphere_Backups/XSI> is an (c)XSITools repo
---------------------------------------------------------------------------------------------------------------------------------
Checking XSITools Repo:
---------------------------------------------------------------------------------------------------------------------------------
Physical count 20246 equals 20246 registered blocks at .xsitools file
1/20246 blocks | Processed 0%.

... thousands of processed lines

20246/20246 blocks | Processed 100%.[0K
2019-03-18T22:03:26|  No errors detected
---------------------------------------------------------------------------------------------------------------------------------
Using stored SMTP server info...
Found conf/smtpsrvs file...
Using SMTP server 1
Open firewall: 2019-03-18T22:03:27|  Opening port 25 for SMTPout-25 service...
...
... the smptp stufff
...
354 Enter mail, end with <CRLF>.<CRLF>
250 Ok, message saved <Message-ID: >
221 See ya in cyberspace
2019-03-18T22:03:35|  Firewall rule SMTPout-25 closed.

What can I do?


BTW: Is it possible to suppress these thousands of processed lines in the log files?

Update: After adding both --on-error and --on-success, it works now as expected.

Last edited by NextLevel (2019-03-19 14:01:18)

Offline

Board footer