Skip to main content
Solved

Script to Modify Subclient


Forum|alt.badge.img+2
  • Bit
  • 5 replies

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

Best answer by Damian Andre

LLL wrote:

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>

 

View original
Did this answer your question?

3 replies

MichaelCapon
Vaulter
Forum|alt.badge.img+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


Forum|alt.badge.img+2
  • Author
  • Bit
  • 5 replies
  • March 29, 2021

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'


Damian Andre
Vaulter
Forum|alt.badge.img+23
  • Vaulter
  • 1287 replies
  • Answer
  • March 29, 2021
LLL wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings