Script to update or define schedule

rpena

Active Newcomer
Joined
Nov 27, 2019
Messages
9
Reaction score
0
Points
0
PREDATAR Control23

Hi,

I'm trying to get working a script that can help us to define or update a schedule, we have TSM with vmware, so we define a script like this:

update schedule DOMAIN_NAME SCHEDULE_NAME options='-vmfulltype=vstor -vmbackuptype=fullvm -asnodename=DATA_MOVER -domain.vmfull="VM=VIRTUAL_MACHINE_LIST" -MODE=IFIncremental'

We have 4 variables:

DOMAIN_NAME
SCHEDULE_NAME
DATA_MOVER
VIRTUAL_MACHINE_LIST= VM1,VM2,....VMn

But when I get into the options part of the schedule it fails, I assume its because I'm not handeling correctly the simple quotes of the options '' and the double quotes in the VM part

How can a I get it to run correctly?
 
PREDATAR Control23

Hi,

We don't use "all-vm", we do it like this:

-domain.vmfull="VM=VM1,VM2,VM3....VMn"
 
PREDATAR Control23

All the examples have "all-vm". The last example given may be what you need:

1574948501934.png
 
PREDATAR Control23

All the examples have "all-vm". The last example given may be what you need:

View attachment 1626

We don't use TSM like that, the way we do it works for us. What I need is a script to simplify the process of creating the schedule with the format I specified in the beginning.

Thank you.
 
PREDATAR Control23

If it's working, what's your question? Looks like you have your command for the script that works. Is the issue with variable substitution?
 
PREDATAR Control23

If it's working, what's your question? Looks like you have your command for the script that works. Is the issue with variable substitution?

Yes! , variable substitution when I encounter simple quotes and then double quotes
 
PREDATAR Control23

You could try:
-domain.vmfull=$1

And you pass "VM=VIRTUAL_MACHINE_LIST" to the script as an argument
 
PREDATAR Control23

Thank you very much, I had to pass the asrgument like this:

run test '"VM=SRVIPAM"'
 
PREDATAR Control23

I think so. I never tried it, but it could be one way to get around it.
 
Top