NAME
Add-DcsReplicationConsistencyRollback
SYNOPSIS
Creates a rollback group of expiring rollbacks for the specified virtual disk group using a Consistency Point marker stored on the replication destination.
SYNTAX
Add-DcsReplicationConsistencyRollback -VirtualDiskGroup <Object> [ -TimeStamp <Object> ] [ -DuplicateDiskId] [ -Connection <String> ] [ -PipelineVariable <String> ]
Add-DcsReplicationConsistencyRollback -VirtualDiskGroup <Object> [ -UserDefinedCode <Byte> ] [ -DuplicateDiskId] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Creates a rollback group of expiring rollbacks for the specified virtual disk group using a Consistency Point marker stored on the replication destination. The marker to use as a restore point can be specified. If optional parameters are not specified, the latest common consistency point marker for the specified virtual disk group will be used as the restore point. This cmdlet requires Continuous Data Protection (CDP) to be enabled on all virtual disks in the virtual disk group on the replication destination.
PARAMETERS
- -VirtualDiskGroup<Object>
- VirtualDiskGroupData object, name or ID that identifies a virtual disk group on the replication destination that has received replication consistency markers. The VirtualDiskGroupData object can be obtained with Get-DcsVirtualDiskGroup.
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -TimeStamp<Object>
- Use this parameter to create a rollback group using the specified date and time as a restore point. The date and time must correspond to a Replication Consistency Point marker stored on the replication destination server. If this parameter is not specified, then the latest common marker stored for the virtual disk group will be used to create the rollback group. (see Example 1) Time should be reflected in UTC. The value can be supplied from the GroupConsistencyPointData object which is returned from the cmdlet Get-DcssReplicationConsistencyPoint. The value can also be supplied as a DateTime object. One way to create a DateTime object is using the PowerShell cmdlet Get-Date. The value can also be provided in a string with the date and exact time which includes milliseconds in this format "yyyy-MM-dd HH:mm:ss.fffffff", for example "2015-06-24 19:56:45.2958955". (See example 4)
-
- Required: false
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DuplicateDiskId<SwitchParameter>
- Specify this parameter only if both the source and the destination virtual disks will be served to clients (hosts) that require the same SCSI inquiry ID (virtual product information).
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -UserDefinedCode<Byte>
- Use the parameter to create the latest rollback group based on the specified marker. A marker with the specified code must exist. Valid values for the code are from 0 - 255.
-
- Required: false
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
VirtualDiskGroupData : Object that identifies and describes the virtual disk group.
OUTPUTS
RollbackGroupData : Object that identifies and describes the rollback group that was created.
NOTES
Also see Set-DcsReplicationConsistencyPoint, Get-DcsReplicationConsistencyPoint
EXAMPLES
$point = Get-DcsReplicationConsistencyPoint -VirtualDiskGroup "VD Group 1 Remote" -UserDefinedCode 10 $point TimeStamp UserDefinedCode --------- --------------- 6/24/2015 9:41:03 PM 10 6/24/2015 7:56:45 PM 10 6/24/2015 7:41:51 PM 10 Add-DcsReplicationConsistencyRollback -VirtualDiskGroup "VD Group 1 Remote" -TimeStamp $point[1].TimeStamp
The cmdlet Get-DcsReplicationConsistencyPoint is invoked to get the marker data for the virtual disk group named "VD Group 1 Remote" with a user-defined code of "10". The data is stored in the variable $point, where the data can be viewed. The cmdlet Add-DcsReplicationConsistencyRollback is invoked to create a rollback group for the virtual disk group named "VD Group 1 Remote". The restore point of the rollbacks will be the timestamp of the second indexed entry [1] in the object. (Indexes in the object begin with [0].) In this manner rollback groups can be created for timestamps other than the latest common marker.
TotalCapacity | : | 21 GiB |
ParentGroupId | : | {be8b88ea-daca-424e-af18-282835a27f26} |
Alias | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
Description | : | |
Sequencenumber | : | 3369 |
Id | : | {c71334b5-e3b9-4892-91f7-d194253d2d71} |
Caption | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
ExtendedCaption | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
Internal | : | False |
$RepConsistencyPtGroups = Get-DcsVirtualDiskGroup | where {$_.Description -like "*consistency point*"} $RepConsistencyPtGroups | ForEach {Add-DcsReplicationConsistencyRollback -VirtualDiskGroup $_}
The cmdlet Get-DcsVirtualDiskGroup is used to get all the objects for virtual disk groups that contain the words "consistency point" in the description. (This requires the user to provide a description.) The returned RollbackGroupData objects are saved to the variable "$RepConsistencyPtGroups. Then the cmdlet Add-DcsReplicationConsistencyRollback is invoked for each VirtualDiskGroupData object saved in the variable. A rollback group is created for each virtual disk group. In this case, there were two groups. The restore point of the rollbacks will be the latest common marker stored on the replication destination.
TotalCapacity | : | 21 GiB |
ParentGroupId | : | {be8b88ea-daca-424e-af18-282835a27f26} |
Alias | : | VD Group 1 Remote 5 @ 6/24/2015 9:41:03 PM UTC |
Description | : | |
Sequencenumber | : | 6200 |
Id | : | {346b6b9e-1bf6-41e5-9fbc-3eecb40f2378} |
Caption | : | VD Group 1 Remote 5 @ 6/24/2015 9:41:03 PM UTC |
ExtendedCaption | : | VD Group 1 Remote 5 @ 6/24/2015 9:41:03 PM UTC |
Internal | : | False |
TotalCapacity | : | 30 GiB |
ParentGroupId | : | {0e3a9ae5-bb8e-43d8-a95d-7d82ae3c312b} |
Alias | : | VD Group 2 Remote @ 7/9/2015 2:19:34 PM UTC |
Description | : | |
Sequencenumber | : | 6334 |
Id | : | {9f8f93d4-e2f5-40a0-84c9-51054149ceac} |
Caption | : | VD Group 2 Remote @ 7/9/2015 2:19:34 PM UTC |
ExtendedCaption | : | VD Group 2 Remote @ 7/9/2015 2:19:34 PM UTC |
Internal | : | False |
$point = Get-DcsReplicationConsistencyPoint -VirtualDiskGroup "VD Group 1 Remote" -UserDefinedCode 10 $point TimeStamp UserDefinedCode --------- --------------- 6/24/2015 9:41:03 PM 10 6/24/2015 7:56:45 PM 10 6/24/2015 7:41:51 PM 10 Add-DcsReplicationConsistencyRollback -VirtualDiskGroup "VD Group 1 Remote" -TimeStamp $point[1]
The cmdlet Get-DcsReplicationConsistencyPoint is invoked to get the marker data for the virtual disk group named "VD Group 1 Remote" with a user-defined code of "10". The data is stored in the variable $point, where the data can be viewed. The cmdlet Add-DcsReplicationConsistencyRollback is invoked to create a rollback group for the virtual disk group named "VD Group 1 Remote". The restore point of the rollbacks will be the timestamp of the second indexed entry [1] in the object. (Indexes in the object begin with [0].) In this manner rollback groups can be created for timestamps other than the latest common marker.
TotalCapacity | : | 21 GiB |
ParentGroupId | : | {be8b88ea-daca-424e-af18-282835a27f26} |
Alias | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
Description | : | |
Sequencenumber | : | 3369 |
Id | : | {c71334b5-e3b9-4892-91f7-d194253d2d71} |
Caption | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
ExtendedCaption | : | VD Group 1 Remote @ 6/24/2015 7:56:45 PM UTC |
Internal | : | False |
$Point = Get-DcsReplicationConsistencyPoint -VirtualDiskGroup "VD Group 1 Remote" -UserDefinedCode 10 $Point TimeStamp UserDefinedCode --------- --------------- 6/24/2015 9:41:03 PM 10 6/16/2015 7:56:45 PM 10 6/16/2015 7:41:51 PM 10 $time = $point.TimeStamp[1].ToString("O") $time 2015-06-16T19:56:45.2958955Z Add-DcsReplicationConsistencyRollback -VirtualDiskGroup "VD Group 1 Remote" -TimeStamp $time
The cmdlet Get-DcsReplicationConsistencyPoint is invoked to get the marker data for the virtual disk group named "VD Group 1 Remote" with a user-defined code of "10". The data is stored in the variable $Point, where the data can be viewed.
The restore point of the rollbacks will be the timestamp of the second indexed entry [1] in the object, which is stored in the variable $time using the PowerShell function ToString("O"). (Indexes in the object begin with [0].)