The XML here is incorrect and looks like it would only support filesystem agent as it is on that link.
I’ve raised the request to get the XML updated to support virtual server agent as well.
However there is an easy fix.
Download the clone_subclient_template.xml and update it with the “vmContent” tag into the XML like so:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <App_CloneSubClientRequest>
<cloneEntity> <subclientName></subclientName> <backupsetName></backupsetName> <instanceName></instanceName> <appName></appName> <clientName></clientName> </cloneEntity>
<subClientProperties> <subClientEntity> <subclientName></subclientName> </subClientEntity> <content> <path></path> </content>
<vmContent> <children equalsOrNotEquals="1" name="" displayName="" type=""/> </vmContent>
</subClientProperties>
</App_CloneSubClientRequest>
Now the clone operation will work.
Example of usage:
in this case we want to clone subclient “Test” under the hyperv default subclient on virtual client “HV”.
The qoperation to create the subclient “TestClone” would be
qoperation execute -af clone_subclient_template.xml -cloneEntity/subclientName Test -cloneEntity/backupSetName defaultBackupSet -cloneEntity/instanceName "Hyper-V" -cloneEntity/appName "Virtual Server" -cloneEntity/ClientName HV -subClientProperties/subClientEntity/subclientName TestClone
This will create the cloned subclient but without any content.
To create it with the VM pattern of “2016” you could run the following
qoperation execute -af clone_subclient_template.xml -cloneEntity/subclientName Test -cloneEntity/backupSetName defaultBackupSet -cloneEntity/instanceName "Hyper-V" -cloneEntity/appName "Virtual Server" -cloneEntity/ClientName HV -subClientProperties/subClientEntity/subclientName TestCloneVM -vmContent/children/displayName 2016 -vmContent/children/type 10 -vmContentOperationType ADD
This would add the VM Name/Pattern = rule to the subclient content
You could probably use any of the rules from the examples on this page
https://documentation.commvault.com/commvault/v11/article?p=32416.htm
Although tag isn’t mentioned it seems to work as a Type “Tag”
I don’t have a vSphere setup to test, but did test this at the GUI level.
So to clone the subclient Test under the default backup set of the vmware client “1234”
and add the content Tag or Tag1 the command would be
qoperation execute -af clone_subclient_template.xml -cloneEntity/subclientName Test -cloneEntity/backupSetName defaultBackupSet -cloneEntity/instanceName "VMware" -cloneEntity/appName "Virtual Server" -cloneEntity/ClientName 1234 -subClientProperties/subClientEntity/subclientName TestCloneTags -vmContent/children/displayName Tag1 -vmContent/children/type Tag -vmContentOperationType ADD
This added the required Tag to the content.
To actually manage and update the subclient content, you should look at some of these pages instead
https://documentation.commvault.com/commvault/v11_sp20/article?p=32371.htm
Hopefully this allows you to continue with your testing.
Cheers
Dave
Hello Dave,
Thank you very much for your answer, it is very well detailed and this allowed me to duplicate a VSA subclient easily.
Have a great day !
Regards,