PowerShell script exchange
Post Reply
maanlicht
Enthusiast
Posts: 32
Liked: 6 times
Joined: Apr 05, 2023 1:06 pm
Full Name: maanlicht
Contact:

Controlling replication source trough powershell

Post by maanlicht »

In an attempt to automate some of our replication job configuration I am looking for a way to read and control the replication source as we sometimes prefer to replicate from backup.
However I am running into what seems 2 limitations in the powershell commandlets. (Running v12 with the april patch)

1. How can we see what source repositories are currently being used?
With the following code snippet I can read if an alternative source is configured but is doesn't tell me what repo is used:

Code: Select all

$job = Get-VBRJob -name 'jobname'
$job.Options.ReplicaSourceOptions.Backup2Vi
I dug trough the entire object tree generated by 'Get-VBRJob' but could find no references to these repos. Is there any alternative way to get this?

2. How can we disable replicating from a source repository for Hyper-V?
For VMWARE we can simply use the "-ReplicateFromBackup" property like in the following snippet:

Code: Select all

Set-VBRViReplicaJob -ReplicateFromBackup:$false
Source: https://helpcenter.veeam.com/docs/backu ... ml?ver=120

However this property does not seem to exist for the Hyper-V equivalent 'Set-VBRHvReplicaJob'
Source: https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Is there any alternative way to do this?
david.domask
Veeam Software
Posts: 2590
Liked: 606 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Controlling replication source trough powershell

Post by david.domask » 1 person likes this post

Hi @maanlicht,

There is a discrepancy between the two platforms, not sure why.

For Set-VBRHvReplica cmdlet, Replica from Backup is controlled by the -SourceRepository flag, but this only allows you to _enable_ Replica from backup, I'm not sure it let's you disable it.

I will play around a little and see if there are supported or unsupported ways, but I'm thinking that this is just something we need to improve the cmdlets on.
David Domask | Product Management: Principal Analyst
maanlicht
Enthusiast
Posts: 32
Liked: 6 times
Joined: Apr 05, 2023 1:06 pm
Full Name: maanlicht
Contact:

Re: Controlling replication source trough powershell

Post by maanlicht » 1 person likes this post

Thank you @david.domask
I guess the work is never finished :) there is always more to improve. But you guys are doing an amazing job! Looking forward to future releases.

I can work with the '-SourceRepository' flag for now... but I am still looking for a way to see what repository is used.
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests