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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2020-06-02 19:38:43

mbutsko
Member
Registered: 2020-05-16
Posts: 8

Where does --on-success go?

I must be doing this wrong. No matter where I place --on-success in a job file (/jobs/ directory), I am given a tip that I hadn't chained any jobs and basic instructions on how to do it.

Job File 1

"/scratch/XSI/XSIBackup-Pro/xsibackup" \
--backup-type="custom" \
--backup-vms="VM1" \
--backup-point="/vmfs/volumes/7bfca734-17d46d28/VM1diff" \
--backup-prog="xsitools:z" \
--backup-id=000 \
--on-success="backupId->001" \
--on-error="backupId->001" \
--exec=yes >> "/scratch/XSI/XSIBackup-Pro/var/logs/xsibackup.log" \

Job File 2

"/scratch/XSI/XSIBackup-Pro/xsibackup" \
--backup-type="custom" \
--backup-vms="VM2" \
--backup-point="/vmfs/volumes/7bfca734-17d46d28/VM2diff" \
--backup-prog="xsitools:z" \
--backup-id=001 \
--on-success="backupId->002" \
--on-error="backupId->002" \
--exec=yes >> "/scratch/XSI/XSIBackup-Pro/var/logs/xsibackup.log"

Of course I also ran the following.

./xsibackup --run-backup=000 --on-success="backupId->001"

yet I receive the same result, no chained backups selected and a tip about how to chain backups. I see other posts about --on-success and have tried to replicate other users' methods to no avail. What am I doing wrong? I am sure it is something very simple. Great software so far, very flexible.

Last edited by mbutsko (2020-06-02 19:39:25)

Offline

#2 2020-06-03 09:27:26

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

Re: Where does --on-success go?

Thank you for your positive feedback.
Are you sure you are running Pro version?
Are you sure you are running the jobs you have posted and not other jobs?
Be carefull if you edit the job files externally not to change line delimiters, i.e.: \n by \r\n, or spaces by some other Unicode character. This may happen without you noticing.
Be careful not to cut&paste directly from Word documents or web pages, similar character substitution may take place.

Jobs are placed in <install-dir>/etc/jobs/...
Appending arguments to --run-backup is useless

You can also run some job interactively by doing something like:
(That way you will be sure that you are running the job you want)

/scratch/XSI/XSIBackup-Pro/etc/jobs/001 &
tail -f /scratch/XSI/XSIBackup-Pro/var/logs/xsibackup.log

And over all, --on-success and --on-error are just artifacts that in the end cross the river to get water, so that people feel there is some argument to chain jobs. You may just concatenate jobs as you would do with any Linux subprocess.

Run job 001 and then job 002, no matter what happens with job 001:

/scratch/XSI/XSIBackup-Pro/etc/jobs/001 ; /scratch/XSI/XSIBackup-Pro/etc/jobs/002

Or...

/scratch/XSI/XSIBackup-Pro/etc/jobs/001
/scratch/XSI/XSIBackup-Pro/etc/jobs/002

Run job 001 and if successfull run job 002:

/scratch/XSI/XSIBackup-Pro/etc/jobs/001 && /scratch/XSI/XSIBackup-Pro/etc/jobs/002

Run job 001 and if it does not succeed don't run 002 but run job 003:

/scratch/XSI/XSIBackup-Pro/etc/jobs/001 && /scratch/XSI/XSIBackup-Pro/etc/jobs/002 || /scratch/XSI/XSIBackup-Pro/etc/jobs/003

Etc...

Offline

#3 2020-06-03 11:49:47

mbutsko
Member
Registered: 2020-05-16
Posts: 8

Re: Where does --on-success go?

Be carefull if you edit the job files externally not to change line delimiters, i.e.: \n by \r\n, or spaces by some other Unicode character. This may happen without you noticing.

Everything else you said has checked out but this may be what was happening, I was editing the jobs in Notepad++ so maybe something there.

Now that last bit about just scripting the chained sequence manually is interesting and looking back very obvious. I will look into doing this. Thank you.

Offline

#4 2020-06-03 11:59:50

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

Re: Where does --on-success go?

As you say (c)XSIBackup is overall flexible, thus you can concatenate or group commands into compound jobs that you may in turn trigger from the crontab just once. Since you have a job in a job file and you know it works, you may treat it as any other Linux executable.

Offline

Board footer