Question

How To Set Backup Filters Via API


Badge +1

Hello,

I’m trying to find a way to apply backup set level filters for VSA Agents via API.

I’m unable to find the XML or JSON on BOL that include the filter section. 

I can apply the filters at the subclient level via API, but the end goal with the backup set filters is to ensure that VMs that meet the filtered criteria no matter which subclient they are associated to are not backed up. 

 

Backup Set Properties:

https://documentation.commvault.com/2022e/essential/45813_rest_api_post_backup_set_properties.html

?????????????????????????

 

Subclient Filters:

https://documentation.commvault.com/2022e/essential/49184_rest_api_post_subclient_properties.html

$apiBodyAddVMFilter ="<App_UpdateSubClientPropertiesRequest>
                <association>
                    <entity>
                        <appName>Virtual Server</appName>
                        <backupsetName>AWS-$region</backupsetName>
                        <clientName>AWS-$AccountId</clientName>
                        <instanceName>Amazon</instanceName>
                        <subclientName>$subclientName</subclientName>
                    </entity>
                </association>
                <subClientProperties>
                    <vmFilterOperationType>ADD</vmFilterOperationType>
                    <vmFilter>
                        <children>
                            <type>10</type>
                            <equalsOrNotEquals>$equalNotEqual</equalsOrNotEquals>
                            <displayName>$FilteredVM</displayName>
                            <description>Filtering Per $WorkOrder</description>
                        </children>
                    </vmFilter>
                    </subClientProperties>
                    </App_UpdateSubClientPropertiesRequest>"


2 replies

Badge +1

I think there is a log that shows the XML that is executed when the action is performed manually, however I cannot remember the log that was monitored in the past. 

Userlevel 7
Badge +23

I think there is a log that shows the XML that is executed when the action is performed manually, however I cannot remember the log that was monitored in the past. 

webserver.log or qsdk.log generally. Sometimes you can increase the debug to get more verbose outputs.

Reply