Add replication job with reseeding option

PowerShell script exchange

Add replication job with reseeding option

Veeam Logoby snzhang2 » Thu Dec 01, 2016 6:27 pm

Hi,

I am looking to create replication jobs that allow for reseeding a replica VM. I don't see this option in the Add-VBRViReplicaJob cmdlet for adding vmware replication job. Is there anyway to use this option from the Veeam Powershell snapin?

Thanks,
Nan
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Add replication job with reseeding option

Veeam Logoby PTide » Thu Dec 01, 2016 6:54 pm

Hi,

Please check the very bottom of this article for example of how to modify repica job for seeding.

Thanks
PTide
Veeam Software
 
Posts: 3137
Liked: 262 times
Joined: Tue May 19, 2015 1:46 pm

Re: Add replication job with reseeding option

Veeam Logoby snzhang2 » Thu Dec 01, 2016 7:22 pm

Version 9.0 of the snapin doesn't seem to have the option -EnableSeeding. The article documentation is for version 9.5.

We are currently using VB&R version 9.0.

Having said that I did find this posting https://forums.veeam.com/powershell-f26/need-a-little-help-with-add-vbrvireplicajob-t19109.html regarding this topic for veeam 7.0, but the solution is quite involved as it requires accessing and making changes to the veeam database.

I am hoping there would be a simpler way to accomplish this in version 9.0. Version 9.5 seems to have added the features for accomplishing this simpler but unfortunately we are not using this version yet.
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Add replication job with reseeding option

Veeam Logoby v.Eremin » Thu Dec 01, 2016 9:24 pm 1 person likes this post

The said parameter has been added in version 9.5. Before that only "creative" (meaning unsupported) workarounds existed. So, the best way would be to update to 9.5 and make use of the given enhancement. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Add replication job with reseeding option

Veeam Logoby snzhang2 » Fri Dec 02, 2016 6:16 pm

Can we use the powershell 9.5 snapin with VB&R version 9.0?
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Add replication job with reseeding option

Veeam Logoby v.Eremin » Mon Dec 05, 2016 9:03 am

Nope, it cannot be used separately. Is there something preventing you from updating VB&R to 9.5? Or it's more like "never update to new version, until first patch is released" practice? :)

Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Add replication job with reseeding option

Veeam Logoby snzhang2 » Mon Dec 12, 2016 10:49 pm

I was able to modify the codes found in the article posted earlier to meet my purposes.

However the code just does the mapping, but it doesn't enable seeding (name -> "low connetcion bandwith" AND Seeding -> "Map replicas to existing VMs"). Would it still be possible to enable reseeding with the Veeam 9.0 cmdlets? Unfortunately we can't upgrade to version 9.5 due to various factors.
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Add replication job with reseeding option

Veeam Logoby v.Eremin » Tue Dec 13, 2016 9:34 am

Have you tried to follow the advice given in the referenced thread?

tsightler wrote:And just in case you need this, the above script only adds entries to the Replica Mapping table, you still have to enable it on the job with the following:
$Job = Get-VBRJob -name "Name of replication job"
$Job.Options.ViReplicaTargetOptions.InitialSeeding = $true
$Job.Options.ViReplicaTargetOptions.UseVmMapping = $true
$Job.SetOptions($Job.Options)
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Add replication job with reseeding option

Veeam Logoby snzhang2 » Tue Dec 13, 2016 4:26 pm

You came through again. Thanks!

This does exactly what I needed.
snzhang2
Influencer
 
Posts: 22
Liked: 1 time
Joined: Wed Oct 12, 2016 3:17 pm
Full Name: Nan Zhang

Re: Add replication job with reseeding option

Veeam Logoby v.Eremin » Wed Dec 14, 2016 10:54 am

You're welcome. If any other assistance is needed, let us know. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] Set-VBRViReplicaJob doesn't know parameters

Veeam Logoby GabesVirtualWorld » Tue Jan 10, 2017 9:54 pm

Hi,
I'm trying to script the seeding mapping of a number of VMs, but the Set-VBRViReplicaJob doesn't seem to accept the parameters -OriginalVM and -ReplicaVM. Could this be a version difference since I can see the manual is for VEEAM v9.5 and I'm running v9.0.

I already have defined the job with all the settings and manually added 1 VM with seeding mapping. Now I want to add more VMs to this job and map them. This is the code I have:

Code: Select all
$JobName = Get-VBRJob -Name "MyReplicaJob"
$SourcevCenter = "vcenter.source.local"
$ReplicavCenter = "vcenter.destination.local"

$OrgVM = Find-VBRViEntity -Server $SourcevCenter -Name "MyVM"
$ReplicaVM = Find-VBRViEntity -Server $ReplicavCenter -Name "MyVM"

All the variables are filled now with the correct information. Then I try to change the job:

Code: Select all
Set-VBRViReplicaJob -Job $JobName -OrignalVM $OrgVM -ReplicaVM $ReplicaVM


Result:
Code: Select all
PS D:\scripts> Set-VBRViReplicaJob -Job $JobName -OrignalVM $OrgVM -ReplicaVM $ReplicaVM
Set-VBRViReplicaJob : Cannot validate argument on parameter 'Job'. The argument is null. Provide a valid value for the
argument, and then try running the command again.
At line:1 char:26
+ Set-VBRViReplicaJob -Job $JobName -OrignalVM $OrgVM -ReplicaVM $ReplicaVM
+                          ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-VBRViReplicaJob], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Command.SetVBRViReplicaJob



When I type just "Set-VBRViReplicaJob" followed by - sign and then tab to scroll through all the parameters, the EnableSeeding / RepositorySeed / EnableVMMapping / OriginalVM / ReplicaVM don't show up.

This is the guide I'm following: https://helpcenter.veeam.com/docs/backup/powershell/set-vbrvireplicajob.html?ver=95 and since it has the 95 at the end...... .

Is there a way to do this in v9.0 ???
GabesVirtualWorld
Service Provider
 
Posts: 140
Liked: 10 times
Joined: Mon Jun 15, 2009 10:49 am
Full Name: Gabrie van Zanten

Re: Set-VBRViReplicaJob doesn't know parameters

Veeam Logoby Andreas Neufert » Wed Jan 11, 2017 9:28 am

I have no test environment at hand, but try to add
-EnableVMMapping
Andreas Neufert
Veeam Software
 
Posts: 2250
Liked: 374 times
Joined: Wed May 04, 2011 8:36 am
Location: Germany
Full Name: @AndyandtheVMs Veeam PM

Re: Set-VBRViReplicaJob doesn't know parameters

Veeam Logoby GabesVirtualWorld » Wed Jan 11, 2017 9:53 am

Andreas Neufert wrote:I have no test environment at hand, but try to add
-EnableVMMapping


That is not an option.

I fixed it using -Entity and then add the VMs I want to add and then go into the job via the GUI and add the seeing using "DETECT".
GabesVirtualWorld
Service Provider
 
Posts: 140
Liked: 10 times
Joined: Mon Jun 15, 2009 10:49 am
Full Name: Gabrie van Zanten

Re: Add replication job with reseeding option

Veeam Logoby v.Eremin » Wed Jan 11, 2017 10:52 am

Could this be a version difference since I can see the manual is for VEEAM v9.5 and I'm running v9.0.

You've hit the nail on the head. The parameters you're looking for have been added in 9.5. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 7 guests