PowerShell script exchange
Post Reply
alexb0922
Lurker
Posts: 2
Liked: never
Joined: Sep 14, 2022 6:20 pm
Contact:

Creating SureBackup Application Group for Multiple VMs in Datastore Cluster

Post by alexb0922 »

Hello,

I'm currently working on setting up a SureBackup application group for multiple VMs that are members of an existing backup job, but I'm facing a few challenges.

The main issue is that all the VMs are part of the backup job "Weekly_Backup_Job", which targets the datastore cluster "DSC-Daily-Cluster".

When I run Get-VBRJobObject -Job "Weekly_Backup_Job", it returns only the datastore cluster and not the individual VMs within that cluster.

My objective is to create SureBackup application groups for these VMs, starting with "Test-VM-001" as a test.

The issue is that when I run Get-VBRJobObject -Job "Weekly_Backup_Job" -Name "Test-VM-001", it returns an empty result because the VM is not explicitly listed in the job objects. This is problematic because I cannot directly reference the VM for the SureBackup application group setup.

To work around this issue, I manually add the VM to the backup job using Add-VBRViJobObject. However, this is not an ideal solution, as I do not want to alter the backup job configuration unnecessarily.

I would prefer a method that allows me to reference the VMs directly from the job without modifying the backup job.

I want to automate the process of creating SureBackup application groups for certain VMs that are members of the "Weekly_Backup_Job" and wonder how can I reference these VMs for SureBackup application group creation, especially when they are not explicitly listed as backup job objects?

Any advice or recommendations would be greatly appreciated.
david.domask
Veeam Software
Posts: 2163
Liked: 519 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Creating SureBackup Application Group for Multiple VMs in Datastore Cluster

Post by david.domask » 1 person likes this post

Hi alexb0922, welcome to the forums.

Add-VBRApplicationGroup requires that you pass an object from New-VBRSureBackupVM on the -VM parameter.

With New-SureBackupVM, you can either add it via Objects in Job or via Restore Points, and I'd advise approach it with Restore Points. The behavior you're seeing with the container is expected; when adding by hierarchy containers (e.g., tags, datastore, cluster), the object itself is the only object added to the job and the VMs underneath that object are looked up "live" during job runs to know what to backup.

Your workaround _can_ work, but I would just fetch it via restore points with Get-VBRRestorePoint. Fetch the backup first, then pass the CBackup object to Get-VBRRestorePoint on the -Backup parameter.
David Domask | Product Management: Principal Analyst
alexb0922
Lurker
Posts: 2
Liked: never
Joined: Sep 14, 2022 6:20 pm
Contact:

Re: Creating SureBackup Application Group for Multiple VMs in Datastore Cluster

Post by alexb0922 »

Thank you for your response, David. I’m working on setting it up based on your advice.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests