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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2018-04-24 16:32:18

Brian
Member
Registered: 2017-09-02
Posts: 4

Commands work outside of Cron

The following commands work when I run them from a bash script (sh file and without the --time parameter).  But when these commands are put into my xsibackup-cron file, only the first command is triggered and successfully completed.  The --on-success does not trigger the second command when run from inside of my cron file (xsibackup-cron).

/vmfs/volumes/datastore1/xsi-dir/xsibackup --time="Mon 03:00|Tue 03:00|Wed 03:00|Thu 03:00|Fri 03:00|Sat 03:00|Sun 03:00" --backup-point=/vmfs/volumes/MacNFS/XSIBackupVMS --backup-how=hot --backup-type=custom --backup-vms="Windows 10 x64 Pro" --backup-prog=vmkfstools --date-dir=no --mail-from=someemail1@gmail.com --mail-to=someemail2@gmail.com --smtp-srv=smtp.gmail.com --smtp-port=465 --smtp-auth=yes --smtp-sec=TLS --subject=XSIBackupReport --smtp-usr=someemail1@gmail.com --smtp-pwd=Password --on-success="backupid->01" --test-mode=false

/vmfs/volumes/datastore1/xsi-dir/xsibackup --backupid=01 --backup-point="/vmfs/volumes/MacNFS/XSIBackupVMS/$(date +'%Y-%m-%d-%H-%M')" --backup-how=hot --backup-type=custom --backup-vms="Windows 10 x64 Pro" --backup-prog=vmkfstools --date-dir=no --test-mode=false

The first command runs successfully from Cron and I get an email with no errors encountered.  But the second line is not triggered with the success of the first command.  I am not sure why this works from a bash script (without the --time parameter).  But these same commands do not work as a cron job?

On a second question, does the ordering of the parameters within a command make any difference?  So for example --on-success="backupid->01" is the second to last parameter in my first command.  This parameter could just as easily been the 4 th parameter from the beginning of the first command.

Offline

#2 2018-04-24 17:57:55

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Commands work outside of Cron

Event handling (--on-sucess & --on-error arguments) are only available in the Pro version

Offline

Board footer