Automatically add corresponding Veeam backup copy and replication jobs with Powershell

0

I had written just a few days ago about a PowerShell script to compare Veeam copy or replication jobs to the regular backup jobs you have setup and see which ones are missing.  This is useful if you have single backup jobs created and want to create corresponding backup copy and replication jobs on your Veeam server.  I wanted to take that a step further and actually create the backup copy and replication jobs that are missing from the configuration compared to backup jobs configured.  Let’s take a look at how to Automatically add corresponding Veeam backup copy and replication jobs with PowerShell.

vbrposh01 Automatically add corresponding Veeam backup copy and replication jobs with Powershell

Automatically add corresponding Veeam backup copy and replication jobs with Powershell

Let’s look at the copy script that compares the names of VMs in backup jobs and copy jobs and then will use that compare to create the copy jobs for VMs who do now have corresponding copy jobs created.  I explained the top part of the logic in the previous post, but again it assumes the names are the same besides <backupjobname> compared to <backupjobname_copy> and same for the replication jobs.  It strips the appended copy or replication designation off, compares the list and comes up with the difference between the two.  Then, we loop through and create the corresponding copy and replication jobs that we need.

Now, very similar script, but different with the requirements for setting up replication job in Veeam.

Thoughts

Once again, PowerShell is a great tool here to quickly work with Veeam jobs.  The PowerShell integration into Veeam makes it extremely powerful in automating, creating, and checking backup jobs.  This makes it super easy to automatically add corresponding Veeam backup copy and replication jobs with Powershell.  Hopefully, someone will find the above script useful if they are trying to accomplish something similar.