The code works, but it only moves the storage policy for one instance. I need it to move the storage policy to all instances.
<App_UpdateSubClientPropertiesRequest>
<subClientProperties>
<commonProperties>
<storageDevice>
<dataBackupStoragePolicy storagePolicyName="xpath:{/workflow/inputs/storagePolicy/storagePolicyName}" />
</storageDevice>
</commonProperties>
</subClientProperties>
<association>
<entity backupsetName=""
subclientName="default"
clientName="xpath:{/workflow/ForEach_1/row/cola@name="name"]}"
appName="SQL Server" />
</association>
</App_UpdateSubClientPropertiesRequest>
This is another way that might work although you will have to test it out.
There is a way to assign a storage policy to a client at the client group level:
https://documentation.commvault.com/2024e/expert/configuring_region_based_data_protection_operations.html
- Turn that on and assign the appropriate storage policy and clients
- Save as script
- Modify the xml - either put it in a workflow or use the generated batch
<associatedStoragePolicies>
<storagePolicyName>Server plan</storagePolicyName>
</associatedStoragePolicies>
You can override the storage policy on the group which should apply to all the default subclients on all the instances of the SQL servers you assign to the group.