replication script

PowerShell script exchange

replication script

Veeam Logoby knight » Thu May 24, 2012 11:45 pm

I am trying to create a basic script that I can use to create replica jobs but have run into a problem and tech support it cant be done…I am a PowerShell n00b so please be gentle.
In my code Entity is "srv-filer123” which is a vm that I want to replicate.
This issue is that –Server flag will not accept the name of my cluster, (03.10 Cluster) and will only take the name of the datacenter (dal-vctr01).
$BackupCluster correctly return the cluster name, but I cant get -Server to accept anything but what is returned for $BackupServer

How do I specify the cluster name in -Server?


Code: Select all
$Entity = Find-VBRViEntity -name "srv-filer123"
$JobName = "srv-filer123-test"
$BackupCluster = Find-VBRViEntity -HostsAndClusters -Name "03.10 Cluster"
$BackupServer = Get-VBRServer -Name "dal-vctr01 "
$Datastore = Find-VBRViDatastore -Server $BackupServer -Name "T3-ATL-1"
$ResourcePool = Find-VBRViResourcePool -Server $BackupServer -Name "Atl Mgmt - Standby"
$Folder = Find-VBRViFolder -Server $BackupServer -Name "Discovered virtual machine"
$Suffix = "_replica"
 
Add-VBRViReplicaJob -Name $JobName -Server ($BackupServer) -Entity ($Entity)  -Datastore ($Datastore) -ResourcePool ($ResourcePool) -Folder ($Folder) -Suffix ($Suffix)
 


Alternatively does anyone have a finished replication script that will do this?
knight
Novice
 
Posts: 5
Liked: never
Joined: Thu May 24, 2012 9:35 pm

Re: replication script

Veeam Logoby Sethbartlett » Fri May 25, 2012 3:43 pm

I actually have your current ticket, you cannot get it to accept a cluster name. You can set it currently to a host. So you could do one of the hosts on that cluster and then change it to the cluster.

Code: Select all
$Server = Get-VBRServer -name "Name of Host under Cluster"


The above would work, but there is not exactly a supported way to get Clusters to work in powershell. As I stated in your ticket, I could maybe get a workaround for you, but it is not supported.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: replication script

Veeam Logoby knight » Mon Jul 02, 2012 7:45 pm

Hello, I would like to add the ability to set the source proxy and alternative repository in my replica job creation script. I have seen several posts and I am able to set the repository and disable the automatic selection of the source proxy, but what do i do to set the source to a specific IP aaddress?
How do I make use of these options:
Code: Select all
#$Type = [Veeam.Backup.Model.CJobProxyInfo+EType]::ESource
#$CJobProxyInfo = 192.168.1.100
knight
Novice
 
Posts: 5
Liked: never
Joined: Thu May 24, 2012 9:35 pm

Re: replication script

Veeam Logoby Sethbartlett » Thu Jul 05, 2012 3:37 pm

You are wanting to set which source proxies will be used for a specific job? Do you need to just set source proxies or also target proxies. Also, you can't just do it by IP Address, it will have to be by the name you added for the proxy, just like you would pick through the GUI.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett


Return to PowerShell



Who is online

Users browsing this forum: Exabot [Bot] and 7 guests