RESTful knowledge exchange
Post Reply
Tais.rozzo
Service Provider
Posts: 1
Liked: never
Joined: Nov 28, 2017 12:45 pm
Full Name: Tais Rozzo
Contact:

Veeam Job Creation with PS cmdlet/ Veeam API and tag-combination

Post by Tais.rozzo »

Hi guys,
we 've a special case. We would switch from our usual backup jobs to vsphere tag jobs and we want to automate that, BUT -> multiple tags are to be used!
Case ID: #04898793

So if a new machine is created in our vmware environment, the vm automatically gets tags based on multiple conditions from an ansible script running daily at a specific time.
Now we want to schedule an ansible script checking if a backupjob is already configured with the name "%customertag%_%backuptag%", if yes, then everything is okay and no changes are required.
If there is no job present with the name combination, the script should create a new backup job with following requirements:

- Name: %customertag%_%backuptag% (e.g. test_backup_7d)
- Jobtype: Backup
- Virtual Machines: Type:Tag Combination with %customertag% & %backuptag%
- Backup Proxy: proxy1; proxy2; proxy3
- Backup Repository: Scale-out Repository
- Retention: 7 days
- Schedule: daily at 00:01 AM

My problem now is, when creating the Backupjob via API, I get the following message: "b'{"errorCode":"UnknownError","message":"Type Multitag is not supported","resourceId":null}'"

Is it possible to create a backupjob with a tags combination via API?
If not, how can I achive these automated backup creation task to backup vms with a tags combination, if not over API?
I have already searched through the documentation but could not find anything abount the tags combination.
Single tags work without a problem, but in veeam version 11 there is a new feature in which I can add VMs to my backup that have multiple tags assigned - so only if a vm have both tags assigned the vm would be backed up.

If i do a "Get-VBRJobObject" I only can see the tags are combined with an "&":

PS C:\Users\user> Get-VBRJobObject 01_TEST-TAGCOMB | Format-Table -AutoSize

Name Type ApproxSize Location
---- ---- ---------- --------
test & backup_7d Include 682,8 GB

How can I create the backupjob via Veeam PS Cmdlet or Veeam API with the tag combination above "test" & "backup_7d"?
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Veeam Job Creation with PS cmdlet/ Veeam API and tag-combination

Post by oleg.feoktistov »

Hi Tais,

This functionality is not yet available for PS and REST API and as of now is planned for vNext.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests