Shawn Masterson's Blog

Veeam v7 – Backing up a single VM within a job

Find the latest version here.

One of the best things about Powershell and the community is the ability to easily find what others have done and improve upon it or tweak it for your own needs. This was the case with a script I found in the Veeam forums a few months back to backup a single VM using Powershell. It worked great (with a minor issue described below) but unfortunately was broken after upgrading to v7.  I was able to identify the issues causing it to fail but was not able to rectify them all. Back to the forums I went and with a little help from the folks at Veeam we were back in business.

There is one ‘gotcha’ to this script. It relies on the fact that VMs are added to the job individually and not via some form of container such as datastore, resource pool, etc. The reason for this lies within the magic of the script itself. Basically what the script does is exclude all objects in the job except the VM you want to back up. If we exclude a container that holds the VM we want to back up then the exclusion overrides and nothing gets backed up. So as long as you create your jobs using individual VMs the script should work like a charm.

Exit mobile version