ghettoVCB icon indicating copy to clipboard operation
ghettoVCB copied to clipboard

VMs with special characters are not backed up

Open web2wire opened this issue 10 years ago • 2 comments

Example, 'Office VM+'

Line 826 in ghettoVCB.sh is this

VM_ID=$(grep -E ""${VM_NAME}"" ${WORKDIR}/vms_list | awk -F ";" '{print $1}' | sed 's/"//g')

The grep is failing because the -E means it is expecting extended regexps which include + as a special character. Removing the -E means it then works (at least the grep part). There doesn't seem a need for -E in that expression unless the VM include/exclusion lists are expected to work with wildcards?

There are several other examples of 'grep -E' in the script so I suspect changes might be needed for all or most of them.

web2wire avatar Mar 13 '15 17:03 web2wire

+1. Tried to remove -E flag for the greps related to VMs and it seems to be working.

xorguy avatar Apr 23 '21 13:04 xorguy

Had a similar problem with the exclusions - since VMGuest1 will not backup if VMGuest1-testing is in the exclusions list.

It would be better to match the whole line, using grep -x though this would then ignore # comments at the end of each line (not sure if that would work anyway)

MalakymR avatar Jan 16 '23 10:01 MalakymR