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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2018-01-24 13:56:29

sistemi
Member
Registered: 2017-08-29
Posts: 74

Xsibackup not firing on-success jobs when using --host parameter

Nightly is launched a backup from host A to host B using cron, upon success I expect that xsibackup launch another job, defined in the host B xsibackup-cron, but id doesn't happen. Other chained backups on the same host are correctly launched.

this is the xsibackup-cron command:

/vmfs/volumes/datastore1/xsi-dir/xsibackup backupId=AR1ZF --time="Tue 00:05|Wed 00:05|Thu 00:05|Fri 00:05" --backup-how=hot --backup-prog=onediff --backup-type=custom --test-mode=false --use-smtp=2 --mail-to=xxxxxx --subject="AR1ZF" --backup-point=<hostC>:/vmfs/volumes/datastore1/bkp --zippa=no --host=<hostB> --backup-vms=zfs1 --debug-info=yes --on-error="backupId->AR2ZF" --on-success="backupId->AR2ZF"

this is the command that should be launched upon success (xsibackup-cron on hostB)

/vmfs/volumes/datastore1/xsi-dir/xsibackup backupId=AR2ZF  --backup-how=hot --backup-prog=onediff --backup-type=custom --test-mode=false --use-smtp=1 --mail-to=xxxxxx --subject="AR2ZF" --backup-point=<hostC>:22:/vmfs/volumes/datastore1/bkp  --host=<host D> --backup-vms=zfs2 --debug-info=yes


this is the mail after the first backup, notice that on-success and on-error are blanks:


Wed Jan 24 00:07:18 UTC 2018
XSIBACKUP-PRO 10.2.5 AT HOST:
    IP v4: <hostB>/ 255.255.255.0
VMware ESXi 5.5.0 build-1331820

Done hot backup (id: ar1zf) using onediff (no compression)
Mirroring following VMs to <hostC>:22:/vmfs/volumes/datastore1/bkp...
VM Name     State     Size (Gb)     Stop     Copy     Start     Time (min)     Speed (mb/s)
zfs1    ON    104/ 121    NO (hot backup)    OK    -     21     81/ 94
Complete backup elapsed time: 21 min
The ESXi configuration was saved to <hostC>:22:/vmfs/volumes/datastore1/bkp
DEBUG INFORMATION:

• backupid: ar1zf
• backuphow: hot
• backupprog: onediff
• backuptype: custom
• testmode: false
• mailto: xxxxxxxx
• usesmtp: 2
• debuginfo: yes
• onerror: backupid-
• onsuccess: backupid-
• from: <hostA>
• exec: yes
• DATE DIR:
• XSIDIR: /vmfs/volumes/524d1b54-ddf4d08c-5600-90b11c388503/xsi-dir
• LAUNCHED BY: cron
• KEY: -4 -o StrictHostKeyChecking=no -i /vmfs/volumes/524d1b54-ddf4d08c-5600-90b11c388503/xsi-dir/xsibackup_id_rsa
• PID: 11274704
• ESXi VERSION: 5.5.0
VMXFILEPATH: /vmfs/volumes/datastore1/zfs1/zfs2.vmx
• VM zfs1 remote VMX path exists at: <hostC>:22:/vmfs/volumes/datastore1/bkp/zfs1/zfs2.vmx
• VM zfs1 SYS DISK1 EXISTS: /vmfs/volumes/datastore1/zfs1/zfs2.vmdk
• VM zfs1 SYS DISK2 EXISTS: /vmfs/volumes/datastore1/bkp/zfs1/zfs2.vmdk
• VM zfs1 CID1: 267a5fac
• VM zfs1 CID2: 267a5fac
• VM zfs1 CID: 0
• VM zfs1 SNAPSHOT: xsibackupdiff
• VM zfs1 SNAPSHOT NUM: 1

Offline

#2 2018-01-26 10:07:54

sistemi
Member
Registered: 2017-08-29
Posts: 74

Re: Xsibackup not firing on-success jobs when using --host parameter

while you are thinking about it, I found that you changed the way to call the remote job, from
ssh $( echo "$SSHOPTS" ) -o ConnectTimeout=20 -p$srv2 ${defremusr}@$srv1 "${xsidefaultpath}/xsibackup \"${keyvalstr} --from=$HOSTIP --exec=yes\" &" >>"$PWD"/xsibackup-cron-${srv1}.log &

to

eval ssh "$SSHOPTS" -o ConnectTimeout=20 -p$srv2 ${defremusr}@$srv1 "\"${xsidefaultpath}/xsibackup ${keyvalstr} --from=$HOSTIP --exec=yes\" &" >>"$PWD"/xsibackup-cron-${srv1}.log &

using eval the backupid-> is lost (perhaps the ">" is interpreted as output redirection), unfortunately I'm not able to solve, please give a workaround!

Offline

#3 2018-01-27 09:07:34

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

Re: Xsibackup not firing on-success jobs when using --host parameter

Yes, you are right, in our effort to make XSIBackup recursive, we applied eval to that remote call too. We'll fix it soon. You can remove that eval or substitute that line by:

ssh $( echo "$SSHOPTS" ) -o ConnectTimeout=20 -p$srv2 root@$srv1 "${xsidefaultpath}/xsibackup \"${keyvalstr} --from=$HOSTIP --exec=yes\" &" >>"$PWD"/xsibackup-cron-${srv1}.log &

Nevertheless, keep your working version until we launch the fix. End of 10.2.X series will contain all bug fixes.

Offline

#4 2018-01-27 11:18:52

sistemi
Member
Registered: 2017-08-29
Posts: 74

Re: Xsibackup not firing on-success jobs when using --host parameter

thanks, i did yesterday, and now my weekly backup chain is working fine! Wait for the next amazing version...

P.S. check also my other post about du -m wrong values it appears randomly and I think is related to some math rounding, counting bytes should solve that bug.

Have a nice weekend.

Regards.

PP

Offline

#5 2018-01-27 11:50:02

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

Re: Xsibackup not firing on-success jobs when using --host parameter

Mmmm, thank you for the feedback. Please send us the log with the details if you have the chance. VMFS block size is 1M, on addition, du bundled with busybox in ESXi can't count bytes. We can easily create some binary or look for othe binary in the system that is able to, but the blocksize fact kept us from doing it. Did you import that .vmdk?, some tools, including VMWare's might not round up to a 1M block count.

Offline

#6 2018-01-29 07:24:11

sistemi
Member
Registered: 2017-08-29
Posts: 74

Re: Xsibackup not firing on-success jobs when using --host parameter

Hi, regarding to the remote backup, the scheduled backups worked fine but today, trying to launch another backup using --run-backup i received an error:

It's a minor bug  for me but i dont'have spare time to investigate...

###############################################################################                                   
#                                                                                                                 
#  (c) XSIBACKUP-PRO 10.2.5 | Backup for (c) VMWARE ESXi Hypervisor by 33hops.co                                  m
#                                                                                                                 
################################################################################                                  ###

Found (c) XSIBackup installation. Remote path is set dynamically
Remote xsi path set to: /vmfs/volumes/524d1b54-ddf4d08c-5600-90b11c388503/xsi-di                                  r
--------------------------------------------------------------------------------                                  --------------------------------------------------------------------------------                                  ---------------------------------
...
...
Preparing to execute backup in remote server: xxx
--------------------------------------------------------------------------------                                  --------------------------------------------------------------------------------                                  ---------------------------------

--------------------------------------------------------------------------------                                  --------------------------------------------------------------------------------                                  ---------------------------------
wc: standard input: Interrupted system call
Copying file EULA to remote server xxx
EULA                                                                       100% 4589     4.5KB/s   00:00

...
...
-------------------------------------------------------------------------------------------------------------     ------------------------------------------------------------------------------------
Executing remote backup on xxx
Saving log locally to => xsibackup-cron-xxx.log
ssh: illegal option --
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]
Killed

Offline

#7 2018-05-15 19:48:42

bpreston
Member
Registered: 2018-05-15
Posts: 5

Re: Xsibackup not firing on-success jobs when using --host parameter

I appear to be having the same problem (with version 10.3.3 and 10.3.4) with onerror and onsucccess stripping the data after the arrow.  Could you please validate the syntax for backupID?  My debug output shows this:


DEBUG INFORMATION:

• backupid: 158
• debuginfo: yes
• onerror: backupid-
• onsuccess: backupid-
• backupprog: xsitools:z


And my commandline looks like this:

./xsibackup --backupId=158 --debug-info=yes --on-error="backupid->153" --on-success="backupid->153" <snip>

Offline

#8 2018-05-16 09:24:48

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

Re: Xsibackup not firing on-success jobs when using --host parameter

If you use --host combined with --on-error, --on-success, you will need to escape the GT symbol. But subsequent job will not be sought in the host where the --host job is being launched from, but in the host where the --host argument points to.

Offline

#9 2018-05-16 09:56:33

sistemi
Member
Registered: 2017-08-29
Posts: 74

Re: Xsibackup not firing on-success jobs when using --host parameter

When the behaviour was changed? I used 10.2.9 for months without changes on xsibackup-cron file, yesterday I switched to 10.3.4 and chained jobs weren't fired.

Anyway, I have to change --on-success="backupId->AR2ZF" with --on-success="backupId-\>AR2ZF" ?

Offline

#10 2018-05-16 14:15:44

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

Re: Xsibackup not firing on-success jobs when using --host parameter

The provided information is confusing and is not enough to track the eventual problem down, so please, open a ticket with the support department and provide detailed information.

Offline

#11 2018-05-16 18:12:39

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

Re: Xsibackup not firing on-success jobs when using --host parameter

TO EXTEND THIS POST's EFFECTIVITY:

It's a general misconception to believe that when you run a remote job by means of the --host argument, the execution control is returned to the master server. We don't state that, we never fed that belief, and we try to fight it as fiercely as we can, but still many people just want to believe it works like that.

When you run a remote job by means of the --host argument, execution control is passed on over to the remote host. So, when the remote job ends, should it have an --on-success and/or --on-error event handlers, the remote XSIBackup installation, and not the one it came from, will look in the remote server's xsibackup-cron file, whether a backup job with the referenced Id exists to be chained.

If after reading this, yo still think you have an issue with the event handlers, please, open a ticket, as these matters are a bit difficult to track with just some comments and very little details.

Thank you for your feedback.

Offline

#12 2018-05-16 18:28:30

bpreston
Member
Registered: 2018-05-15
Posts: 5

Re: Xsibackup not firing on-success jobs when using --host parameter

Thank you for the explanation.  That was precisely my misconception, and I suppose I may have had that impression since the logs (for each host) appear on the originating host.  And it certainly explains the error that I just received (after escaping the caret), which is:

2018-05-16T17:48:39|  Warning: no backups or programs can be fired as there isn't any xsibackup-cron file present

Thanks, will reconsider how I'm executing from the cron file.

Offline

Board footer