Solved

Script to Modify Subclient

  • 29 March 2021
  • 3 replies
  • 550 views

Badge +2

Hello

Is it possible to modify subclient using command line/powershell?

The backup content name changes every day and i would like a way to update the subclient content automatically without me having to upgrade the file to backup.

We are running commvault v11.22.13

icon

Best answer by Damian Andre 29 March 2021, 19:45

View original

3 replies

Userlevel 6
Badge +14

Hi,

 

You could use the Command Line to update the content path of the subclient, see the following link: Modifying a Windows File System Subclient from the Command Line Interface (commvault.com)

 

Best Regards,

Michael

Badge +2

Hi Michael

Using your link i was able to modify the content of the subclient.

Is it possible to add multiple content path using the switch -content/path <path> or is it one path per command?

For example

qoperation execute -af update_subclient_add_template.xml -clientName Test1 -subclientName SubTest1 -contentOperationType ADD -content/path '/Test1/SubTest2/BackupFile','/Test1/SubTest2/BackupFile2'

Userlevel 7
Badge +23

Hi Michael

Using your link i was able to modify the content of the subclient.

Is it possible to add multiple content path using the switch -content/path <path> or is it one path per command?

For example

qoperation execute -af update_subclient_add_template.xml -clientName Test1 -subclientName SubTest1 -contentOperationType ADD -content/path '/Test1/SubTest2/BackupFile','/Test1/SubTest2/BackupFile2'

Hi @LLL,

The qoperation command does not support multiple paths at once, so you’d have to run it several times to achieve all the paths you need.

Alternatively, if you would like to add multiple paths for the sub-client contents with a single command you can use qoperation exec instead, and provide an XML input file. You will need to do so by modifying the XML directly as mentioned in the documentation here:

https://documentation.commvault.com/commvault/v11/article?p=18670.htm

 

You can specify multiple paths to your subclient content as shown in the following example:

<content>

<path>C:\Documents and Settings</path>

</content>

<content>

<path>C:\Users</path>

</content>

<content>

<path>C\backupFolder2</path>

</content>

<content>

<path>C:\backupfolder3</path>

</content>

 

Reply