Failback script, commitfailback command

PowerShell script exchange

Failback script, commitfailback command

Veeam Logoby fla » Wed Apr 10, 2013 1:59 pm

Hi,

I'm building scripts to manage the failover and the failback of a vmware infrastructure.
No problem for the failover script, but for the failback I don't find the command to do the "commitfailback".

Does someone know this command?

Thanks in advance
fla
Lurker
 
Posts: 1
Liked: never
Joined: Mon Mar 25, 2013 10:03 am
Full Name: fla

Re: Failback script, commitfailback command

Veeam Logoby v.Eremin » Thu Apr 18, 2013 2:25 pm

First of all, you have to failover to the existing replica in DR site:

Code: Select all
asnp VeeamPSSnapin
$RestorePoint = Get-VBRReplica -name "Name of your Replication Job" | Get-VBRRestorePoint | ? {$_.VmName -eq "Name of your VM"} | Sort-Object CreationTime -Descending | Select -First 1
Start-VBRViReplicaFailover -RestorePoint $RestorePoint -Confirm:$False


Then, perform a failback operation:

Code: Select all
Start-VBRViReplicaFailback -RestorePoint $RestorePoint


And finally commit it:

Code: Select all
$RestorePoint = Get-VBRReplica -name "Name of your replication job" | Get-VBRRestorePoint | ? {$_.VmName -eq "Name of your VM"} | Sort-Object CreationTime -Descending | Select -First 1
Start-VBRViReplicaFailback -RestorePoint $RestorePoint -Complete: $True


Please, be aware that you’ll probably need to run the line which starts with $RestorePoint once again in order to catch point that will be created during failback operation (the last one), that’s why I put it here.

As always, don't forget to test it before implementing.

Hope this helps.
Thanks.
v.Eremin
Veeam Software
 
Posts: 13290
Liked: 971 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 11 guests