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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2021-12-03 12:46:32

kd.gundermann
Member
Registered: 2018-02-27
Posts: 34

XSIBackup-DC 1.5.1.3 : Error parsing job

Creating a new Backup job with GUI creates a job file:

/xsi-dir/xsibackup \
--backup \
"VMs(NavApp3)" \
"/vmfs/volumes/xsibackup02/DC" \
--description="NavApp3" \
--mail-to="administrator@xxxxxxxxxxx.de" \
--subfolder="NavAPP3" \
--use-smtp="1" \
--subject="NavAPP3" \

ooh, I forgot to add the config-backup option, so adding it with the GUI changes to job file to:

/xsi-dir/xsibackup \
--config-backup \
--backup \
"VMs(NavApp3)" \
"/vmfs/volumes/xsibackup02/DC" \
--description="NavApp3" \
--mail-to="administrator@xxxxxxxxxxx.de" \
--subfolder="NavAPP3" \
--use-smtp="1" \
--subject="NavAPP3" \
>> /xsi-dir/var/log/xsibackup.log 2>&1

and now, trying to edit the job again with the GUI gives errors:

+---------------------------------------------------+
| Action argument not recognized, setting to <none> |
| Source argument not recognized, setting to <none> |
| Target argument not recognized, setting to <none> |
+---------------------------------------------------+

Offline

#2 2021-12-07 12:18:25

admin
Administrator
Registered: 2017-04-21
Posts: 1,983

Re: XSIBackup-DC 1.5.1.3 : Error parsing job

Was that the exact sequence of events?
We have tried to reproduce this behaviour, still we couldn't.
We know it's perfectly possible that such a bug could be present, still it might depend on the (c)ESXi version.
Please, let us know as much details as you can.

Offline

#3 2022-04-07 17:40:01

kd.gundermann
Member
Registered: 2018-02-27
Posts: 34

Re: XSIBackup-DC 1.5.1.3 : Error parsing job

updated to 1.5.1.12 and still having problems creating or editing jobs.
e.g.
- start xsibackup-gui
- Jobs -> Add
- Id : 030
- Action: Backup
- Source: Custom: Select VM
- Target: Local: Select NFS mounted directory
- add description
- add mail-to
- add rotate: 20
- add subfolder
- add use-smtp
- add verbosity
- Save job

Two files were created in ./etc/jobs :

[root@Server1:/tmp/_osdatadqht2t7g/XSI/XSIBackup-DC/etc/jobs] ls -al
-rw-r--r--    1 root     root            21 Apr  7 17:29 030
-rwx------    1 root     root           311 Apr  7 17:31 USV-HQ-Rack1

[root@Server1:/tmp/_osdatadqht2t7g/XSI/XSIBackup-DC/etc/jobs] cat 030
/xsi-dir/xsibackup \
[root@Server1:/tmp/_osdatadqht2t7g/XSI/XSIBackup-DC/etc/jobs] cat USV-HQ-Rack1
/xsi-dir/xsibackup \
--subject="USV-HQ-Rack1" \
--verbosity="6" \
--backup \
"VMs(USV-HQ-Rack1)" \
"/vmfs/volumes/xsibackup01/DC" \
--description="USV-HQ-Rack1" \
--mail-to="administrator@xxxxxxxxxx.de" \
--rotate="20" \
--subfolder="USV-HQ-Rack1" \
--use-smtp="1" \
>> /xsi-dir/var/log/xsibackup.log 2>&1

Offline

#4 2022-04-08 09:55:57

admin
Administrator
Registered: 2017-04-21
Posts: 1,983

Re: XSIBackup-DC 1.5.1.3 : Error parsing job

Thank you for your feedback. We will revise this odd behaviour and fix it ASAP.
We must say that the order of the first arguments, which, as you know, are fixed in position (action, source and target) is hardcoded into the GUI scripts, which would make it extremely rare that some other argument takes precedence in the chain of arguments, still, it's obvious that you are experiencing this problem.
Thank you very much for the exact sequence that you followed, this will be key to find the bug.

UPDATE:

We have detected that it does happen when adding all options in a row. Until we release a fix (in short), editing the job file manually is the simplest solution. Also deleting the offending options and adding them back again by editing the job file seems to work well.

PROBLEM DESCRIPTION:

The problem seems to be in the job argument ordinal. As soon as 10 is reached the arguments are sorted by the argument Id ordinal, but they are sorted alphabetically instead of numerically making --description (10) take precedence to --backup (2).

We will hold launching v. 1.5.1.13 and include the fix. Sorry about the inconvenience.

QUICK FIX:

You can easily fix the issue on your own by just adding one character to the GUI code.

1/ Look for the file gui/src/jobs
2/ At line 505 you should find the function setJobArg()

setJobArg(){
    CHKARGU="$( echo "$CURRJOB" | awk -F ';' -v key=$1 -v OFS=';' '{if($2==key){print $0}}' | wc -l )"
    if [ "$CHKARGU" -gt "0" ]
    then
        if [ "$2" == "DELETE" ]
        then
            CURRJOB="$( echo "$CURRJOB" | awk -F ';' -v key=$1 -v OFS=';' '{if($2!=key){print $0}}' )"
        else
            VAL="${2}";VAL="$( Trim "$VAL" )";if [ "${VAL}" == "" -o "${VAL}" == "()" ];then VAL="<none>";fi
            CURRJOB="$( echo "$CURRJOB" | awk -F ';' -v key=$1 -v val="$VAL" -v OFS=';' '{if($2==key){$3=val};print $0}' )"
        fi
    else
        if [ "$2" != "DELETE" ]
        then
            VAL="${2}";VAL="$( Trim "$VAL" )";if [ "${VAL}" == "" -o "${VAL}" == "()" ];then VAL="<none>";fi
            CURRJOB="$( echo "$CURRJOB" | awk -F ';' -v key="$1" -v val="$VAL" -v OFS=';' '{print $0};END{printf "%s;%s;%s;option\n", (NR+1), key, val}' | sort -u )"
        fi
    fi
}

3/ The last CURRJOB assignment

CURRJOB="$( echo "$CURRJOB" | awk -F ';' -v key="$1" -v val="$VAL" -v OFS=';' '{print $0};END{printf "%s;%s;%s;option\n", (NR+1), key, val}' | sort -u )"

Is lacking an "n" argument at the last sort statement, just add it and leave it like this:

CURRJOB="$( echo "$CURRJOB" | awk -F ';' -v key="$1" -v val="$VAL" -v OFS=';' '{print $0};END{printf "%s;%s;%s;option\n", (NR+1), key, val}' | sort -un )"

Offline

Board footer