Veeam Backup & Replication v10: Data Integration API examples

Veeam Backup & Replication v10: Data Integration API examples

At VeeamON 2019, I did a live demo around the new Veeam Backup & Replication v10 feature called “Data Integration API“. This is a great new feature that will make 3rd party integration into your backups even easier.

After the demo, I had several discussions about the use cases and people asked me for the specific code (and even the Veeam Backup & Replication build used at VeeamON). At that point in time, I would redirect them to my sneak peek post which contained a video of the demo. During the BETA and RC phase of Veeam Backup & Replication v10, there was a blog post on the official Veeam blog which contains a short example on how to present backup data taken from the last restore point in a backup to an external server via iSCSI. On top of that, I silently published the code on my personal GitHub so people could leverage it.

As Veeam Backup & Replication v10 is now GA, I decided to make this quick blog post so everyone can get started with the API and provide some other examples. The scripts are now also available via my personal GitHub and I’ve also added the examples to VeeamHUB, Veeam’s community-driven GitHub.

Disclaimer: The scripts provided are based upon testing with Veeam Backup & Replication v10 GA in a lab-based environment. I suggest to analyze the scripts and modify them to your needs before running it in production.

Below is a list of parameters you will have to change based upon the script you want to use.

(Only in the first example)
# The vmname variable $vmname is where you define the Virtual Machine name
$vmname = "MYVIRTUALMACHINENAME"

(Below is available in every example)
# The backup variable $backup is populated by the cmdlet Get-VBRBackup which will return info regarding the backup data
$backup = Get-VBRBackup -Name "MYBACKUP"

# Provide the host name of the target server
$targetServerName = "TARGETSERVER"

# Provide the credentials to access the remote server, for example: lab\administrator
# These must be stored within the Credentials manager in Veeam Backup & Replication
$targetAdminCreds = Get-VBRCredentials -name "LAB\Administrator"

Below is the output when you leverage example 3 and mount all the backup data in your backup file. We have 7 restore points available which will be published upon running the script.

Available restore points

The published disks can be seen in the history tab within the Veeam Backup & Replication console, as well as the “Instant Recovery” tab.

All running sessions

And finally, you can see the disks mounted on the target server via Windows Disk Manager.

Windows Disk Manager with the presented disks

Get creative!

As you can see, it is really simple to publish data and get creative on how to leverage it for data analytics, forensics… Did you already make something or have an amazing idea? We encourage you to publish it to VeeamHub and share it with everyone.

Let’s get creative!

Niels Engelen on GithubNiels Engelen on Twitter
Niels Engelen
Working as a Principal Analyst in Product Management for Veeam Software with an interest in anything virtual and cloud with a strong focus on AWS, Azure and Microsoft 365. He is also a VMware Certified Professional, a Veeam Certified Architect and gained the VMware vExpert award (2012-2022).
Comments are closed.