There’s always been a number of ways to apply filters to VM’s and disks. It could be done at the Backup-Set or Sub-client level.
This is a little bit clunky and can lead to unnecessary VM’s being backed up. If you’re using a Capacity based licence, this is obviously not optimal. Space is a premium !
If filtered by a Folder, it can easily be moved unknowingly and then may miss a backup. Bad.
When Service Pack 8 for CommVault 11 was released, a long-awaited feature was introduced, allowing VM’s to be filtered using Tags at the vSphere inventory level.
There are some requirements;
- vSphere 5.5 and above
- Minimum PowerCLI version 6 Release 2 on the VSA Proxy.
Filtering by Tags can only be applied to the following Inventory items;
- Cluster
- Datacenter
- Datastore
- Datastore Cluster
- Folder
- Host
- Resource Pool
- vApp
- Virtual Machine
In my opinion, at the VM is the most efficient setup. Typically what I’ll do is include /everything/ (via DataCenter) in the VSA sub-client and then use simple tags on the VM’s to do the filtering.
To create a Tag from the Web client; From the Home Screen, click on Tags
Firstly, create a Category for the Tag(s), I have created a Category called “CommVault Backups”
Click back to the Tags, and Create a Tag. I have created “No Backups” with the “CommVault Backups” Category.
To create the Category from PowerCLI;
1 |
New-TagCategory -Name "CommVault Backups" -Cardinality single -EntityType Virtual Machine |
To create a Tag from PowerCLI;
1 |
New-Tag -Name "No Backups" -Category "CommVault Backups" |
Apply the Tag to a VM called MYTESTVM
1 |
New-TagAssignment -Tag "No Backups" -Entity MYTESTVM |
Add the Tag to all VM’s in the “TestVMs” Folder and any Sub-Folders;
1 2 3 |
$TagName = Get-Tag "No Backups" $VMName = Get-Folder "TestVMs" | Get-VM New-TagAssignment -Tag $TagName -Entity $VMName |
Add the Tag to all VM’s with “test” in their name;
1 2 3 |
$TagName = Get-Tag "No Backups" $VMName = Get-VM '*test*' New-TagAssignment -Tag $TagName -Entity $VMName |
For auditing, list the VM’s with the “No Backups” Tag applied;
1 |
Get-TagAssignment -Category "CommVault Backups" |
Apply the tag to the CommVault VSA Client filters; This has to be done using the “Browse” option, not “Add”.
Done. It’s that easy !
1 |