You are not logged in.
Hi
Is it possible start multiple jobs on '--on-success' or '--on-error'?
When running './xsibackup --menu' it says something like:
--
Set the --on-success and --on-error event to chain additional ...
Examples:
- Job Id: 003, job1, ...
- Local script: /vmfs/volumes/datastore1/my_script.sh
- HTTP URL: https://...
etc.
--
'./xsibackup --menu' seems to allow it but does not accept a syntax like '003, job1'
I have a script 'myscript.sh' that just writes status to a another file. I tried this syntax but it does not work:
"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--snapshot=includememory \
--options=unreg-xsibak \
--certify-backup=yes \
--backup-point=/vmfs/volumes/datastore1 \
--backup-type=Custom \
--backup-vms="MY-LINUX" \
--backup-how=Hot \
--on-success="backupId->myscript.sh, 00011" \
--on-error="backupId->myscript.sh, 0011" \
--backup-id=0010 \
--description="0010" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"
But is it possible at all to set more than one job and what is the syntax?
Cheers!
Martin
Offline
Hi again
By the way 'myscript.sh' is placed in '/vmfs/volumes/datastore1/xsi-dir/jobs' together with other jobs.
I have also tried to rename 'myscript.sh' to '0012' with no success:
--on-success="backupId->0012, 0011"
This works but it but only fires one job obviously:
--on-success="backupId->myscript.sh"
Cheers!
Martin
Offline
Backup jobs must be named 000 to 999, you may place any script placed in the jobs folder and call it from --on-success and --on-error.
That differentiation is only made so that you can trigger different things in each case, but if you just want to launch something in any case, then you can just write jobs one after another in the same job file.
Offline
Yes, I think know what you mean but I would not be able to setup such a job with './xsibackup --menu' as the GUI only looks at backup-id's individually. So I would need to setup such job file in cron manually?
But I would still like to know if I can do something like this:
--on-success="backupId->0012, 0011" \
--on-error="backupId->0012, 0011" \
, where job '0012' is a script and '0011' is a new backup job?
Job '0012' works fine and is just writing to a file:
echo "some text about the job that just finished" >> /to/some/file.txt
Cheers!
Martin
Last edited by malinux (2019-07-30 22:20:13)
Offline
No you cannot separate jobs by commas, you can't use four digits either, you must use job names 000 - 999
You can't combine scripts with the GUI, some advanced techniques like this will require you to edit the job files manually. It isn't a big deal in any case, just cut and paste jobs one after another or create your own scripts (remember 000-999) and invoke them as if they were jobs.
Offline
Thanks, I got it all working now like you said :-)
Cheers!
Martin
Offline