Follow up to my question on how to find VM/disk excluded.
For MSSQL server we exclude disks 3,4,5 (SCSI 0:3-0:5). I want to automate this but all examples I could find seem to require that the VM itself is added to the job, where we either add a cluster or based on tags. I would need to feed the script the VM name and the job name. Or just all jobs in case a VM is moved, which currently screws up excludes as they only cover the cluster the VM is currently running in...
I found https://www.robvit.com/veeam/backup_rep ... owershell/
But this seems to set excludes for every object in a job. I tried to filter on $jobobject but the VM itself is not an object, its the cluster.
-
pirx
- Veteran
- Posts: 665
- Liked: 99 times
- Joined: Dec 20, 2015 6:24 pm
- Contact:
-
david.domask
- Veeam Software
- Posts: 3084
- Liked: 711 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: exclude disks of Individual VMs
Hi pirx,
There's no supported means of setting disk exclusions via Powershell -- I've not played with the unsupported methods in the blog post you found and I would not rely on these as eventually we want to close out use of unsupported .NET methods / .NET reflection, so eventually your script will break.
Probably, you'll need to write some code with Invoke-WebRequest to call the VBR API which lets you set disk inclusion / exclusions per job. I don't have an example to share at the moment but it should be pretty straight forward.
There's no supported means of setting disk exclusions via Powershell -- I've not played with the unsupported methods in the blog post you found and I would not rely on these as eventually we want to close out use of unsupported .NET methods / .NET reflection, so eventually your script will break.
Probably, you'll need to write some code with Invoke-WebRequest to call the VBR API which lets you set disk inclusion / exclusions per job. I don't have an example to share at the moment but it should be pretty straight forward.
David Domask | Product Management: Principal Analyst
-
pirx
- Veteran
- Posts: 665
- Liked: 99 times
- Joined: Dec 20, 2015 6:24 pm
- Contact:
Re: exclude disks of Individual VMs
Bummer. I pushed internally that we should manage our excludes via automation as this is very error prone. How do others handle this, manual way is a nightmare.
-
david.domask
- Veeam Software
- Posts: 3084
- Liked: 711 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: exclude disks of Individual VMs
Well, automation is possible, just you will need to dip into REST API a bit
You can do it within Powershell with the Invoke-WebRequest cmdlet and the API endpoint I linked.
David Domask | Product Management: Principal Analyst