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.

Advertisements

5 thoughts on “Veeam v7 – Backing up a single VM within a job

  1. Phil

    Great script :-), any chance you’ll post an updated version for Veeam 8? The script makes an error when it tries to put the excluded vm’s back in the job…

    Reply
      1. Phil

        Quick reply, thanks… 🙂 unfortunately I need it to backup a newly added vm (full backup), and this feature only supports vm’s that have already been backed up…

  2. Pingback: Veeam v8 – Backing up a single VM with PowerShell | Shawn Masterson's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s