Blog

Veeam Policies from Tags or Attributes

last updated on 2018-07-14

Following on from the blog post on Veeam Backup as Code, there are several large customers who use VMware Tags or Attributes to help define backup job creation. This matters, because by doing so it reduces individual job maintenance, and in an ideal scenario allows Veeam Backup & Replication to 'manage itself', and your backups 'automagically' appear on disk.

This is a pretty cool concept that does not involve any user interface changes. Instead of manually creating jobs associated with specific VMware tags, we create a scheduled task that calls a PowerShell script. This script dynamically creates jobs from templates, and adds virtual machines based on their tags or attributes. Existing job object count and overall disk size are used as part of this calculation, so that no single job becomes 'too big' to manage individually. Of course, the reverse experience needs to managed too. Once a machine no longer requires this association, it is automatically removed from a job.

There are two example scripts you can download for this. Either BR-UpdateJobByTag or BR-UpdateJobByAttribute scripts, which will have to be run as a scheduled task with elevated rights. To update the job by tag a category should be used, and each tag value should have a similarly named template job. For attributes, the attribute name is set, and each value is associated with a template.

There are additional things that can be done around scheduling. And understandably, this is not a user-interface driven thing. But feedback is always welcome.