Skip to content

Conversation

@ffejtable
Copy link

Allow square brackets and parenthesis in VM names

First step to correct this was properly handling how the vms_list file was being created (parsed output from vim-cmd vmsvc/getallvms) additional variables are then created, prefixed with "esc_" containing the proper escape sequence for VM Names when used in various subsequent commands.  Original variable names are kept as they are still used in places where the escaping is not needed, such as in logging.

Additional special characters can be handled by modifying the sed statement on line 959.

The restore script will also need to be updated.
Space missing in conditional which triggered ash error.
Did not need to escape the parenthesis in the sed statement
@ffejtable
Copy link
Author

I believe this will also add the functionality requested for spaces in Issue #84 I'd have to look closer to see if it also addresses the brackets.

@ghost
Copy link

ghost commented Aug 27, 2019

this is great, it is able to grep the vm names with brackets when backing up..
but it didn't work with VM_BACKUP_ROTATION_COUNT.
I'm not great on bash..
can you please make that change for that piece of code also..
thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant