This is an archive version of the document. To get the most up-to-date information, see the current version.

Stop-VBRReplicaFailover

In this article

    Short Description

    Undoes the replica failover.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus

    Syntax

    Stop-VBRReplicaFailover [-RestorePoint] <COib> [-RunAsync] [-Force] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

    Related Commands

    Get-VBRRestorePoint

    Detailed Description

    This cmdlet allows you to undo the replica failover.

    This cmdlet lets you finalize the replica failover started with Start-VBRViReplicaFailover by reverting back to the production VM discarding changes.

    When you undo the failover, you switch back to the original VM, revert replication operations and discard changes made to the working VM replica. In this case you loose all the changes that were made to the replica while you failed over to it. You can select a restore point to revert to.

    To switch back to the production VM and synchronize the changes made to the replica while failover, start a failback process. Run Start-VBRViReplicaFailback or Start-VBRHvReplicaFailback to fail back to the VMware or Hyper-V production VM respectively.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    RestorePoint

    Specifies the restore point of the production VM to recover to.

    True

    1

    True (ByValue,
    ByProperty
    Name)

    False

    RunAsync

    Indicates that the command returns immediately without waiting for the task to complete.

    False

    Named

    False

    False

    Force

    If set, the replica will be reverted in crash consistent mode. If any errors occur during the undo failover, the replica restore point will be corrupted.

    If not set, the cmdlet will stop the undo failover in case of error. You will need to try to undo failover again.

    False

    Named

    False

    False

    WhatIf

    Specifies whether the cmdlet writes a message that describes the effects of running the cmdlet without actually performing any action.

    False

    Named

    False

    False

    Confirm

    Specifies whether the cmdlet displays a prompt that asks if the user is sure that they want to continue.

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

    Example 1

    This command stops failover process by reverting to the production VM. The restore point of the replica VM is obtained with Get-VBRRestorePoint and piped down. The restore points of the VM are filtered with Sort-Object method by the "creationtime" property to get the most recent one. The reason is "Configuration recovery". The RunAsync parameter is set to bring the process to the background. The -Force parameter is set to start the replica job running anyway.

    PS C:\PS> Get-VBRRestorePoint -Name "WebServer_replica" | Sort-Object $_.creationtime -Descending | Select -First 1 | Stop-VBRReplicaFailover -Reason "Configuration recovery" -RunAsync -Force

    Example 2

    This command stops failover process by reverting to the production VM. The restorepoint of the replica VM is represented by the $"WebServer_replica restorepoint" variable. The restore point is obtained with Get-VBRRestorePoint and assigned to the variable beforehand. The reason is "Data recovery". The RunAsync parameter is set to bring the process to the background.

    PS C:\PS> Stop-VBRReplicaFailover -RestorePoint $"WebServer_replica restorepoint" -Reason "Data recovery" -RunAsync