Skip to content

Commit 8fa7534

Browse files
Andrii_BilouskoAndrii_Bilousko
authored andcommitted
Update Get-AzRecoveryServicesBackupRecoveryPoint.md and Restore-AzRecoveryServicesBackupItem.md
1 parent 5d7e2b9 commit 8fa7534

File tree

3 files changed

+74
-26
lines changed

3 files changed

+74
-26
lines changed

src/RecoveryServices/RecoveryServices/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
* Update 'Wait-AzRecoveryServicesBackupJob.md'
2525
* Update 'Set-AzRecoveryServicesVaultContext.md'
2626
* Update 'Get-AzRecoveryServicesBackupItem.md'
27+
* Update 'Get-AzRecoveryServicesBackupRecoveryPoint.md'
28+
* Update 'Restore-AzRecoveryServicesBackupItem.md'
2729
* Updated service call for Unregistering container for Azure File Share
2830

2931
## Version 1.4.2

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesBackupRecoveryPoint.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,50 @@ schema: 2.0.0
99
# Get-AzRecoveryServicesBackupRecoveryPoint
1010

1111
## SYNOPSIS
12+
1213
Gets the recovery points for a backed up item.
1314

1415
## SYNTAX
1516

1617
### NoFilterParameterSet (Default)
18+
1719
```
1820
Get-AzRecoveryServicesBackupRecoveryPoint [-Item] <ItemBase> [-VaultId <String>]
1921
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2022
```
2123

2224
### DateTimeFilter
25+
2326
```
2427
Get-AzRecoveryServicesBackupRecoveryPoint [[-StartDate] <DateTime>] [[-EndDate] <DateTime>] [-Item] <ItemBase>
2528
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2629
```
2730

2831
### RecoveryPointId
32+
2933
```
3034
Get-AzRecoveryServicesBackupRecoveryPoint [-Item] <ItemBase> [-RecoveryPointId] <String>
3135
[[-KeyFileDownloadLocation] <String>] [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
3236
[<CommonParameters>]
3337
```
3438

3539
## DESCRIPTION
40+
3641
The **Get-AzRecoveryServicesBackupRecoveryPoint** cmdlet gets the recovery points for a backed up Azure Backup item.
3742
After an item has been backed up, an **AzureRmRecoveryServicesBackupRecoveryPoint** object has one or more recovery points.
38-
Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
43+
Set the vault context by using the -VaultId parameter.
3944

4045
## EXAMPLES
4146

4247
### Example 1: Get recovery points from the last week for an item
43-
```
44-
PS C:\> $StartDate = (Get-Date).AddDays(-7)
45-
PS C:\> $EndDate = Get-Date
46-
PS C:\> $Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM"
47-
PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM
48-
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $Startdate.ToUniversalTime() -EndDate $Enddate.ToUniversalTime()
48+
49+
```powershell
50+
PS C:\> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
51+
PS C:\> $StartDate = (Get-Date).AddDays(-7)
52+
PS C:\> $EndDate = Get-Date
53+
PS C:\> $Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM" -VaultId $vault.ID
54+
PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM -VaultId $vault.ID
55+
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $Startdate.ToUniversalTime() -EndDate $Enddate.ToUniversalTime() -VaultId $vault.ID
4956
```
5057

5158
The first command gets the date from seven days ago, and then stores it in the $StartDate variable.
@@ -57,6 +64,7 @@ The last command gets an array of recovery points for the item in $BackupItem, a
5764
## PARAMETERS
5865

5966
### -DefaultProfile
67+
6068
The credentials, account, tenant, and subscription used for communication with azure.
6169

6270
```yaml
@@ -72,6 +80,7 @@ Accept wildcard characters: False
7280
```
7381
7482
### -EndDate
83+
7584
Specifies the end of the date range.
7685
7786
```yaml
@@ -87,8 +96,9 @@ Accept wildcard characters: False
8796
```
8897
8998
### -Item
99+
90100
Specifies the item for which this cmdlet gets recovery points.
91-
To obtain an **AzureRmRecoveryServicesBackupItem** object, use the Get-AzRecoveryServicesBackupItem cmdlet.
101+
To obtain an **AzureRmRecoveryServicesBackupItem** object, use the **Get-AzRecoveryServicesBackupItem** cmdlet.
92102
93103
```yaml
94104
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ItemBase
@@ -103,6 +113,7 @@ Accept wildcard characters: False
103113
```
104114
105115
### -KeyFileDownloadLocation
116+
106117
Specifies the location to download the input file to restore the KeyVault key for an encrypted virtual machine.
107118
108119
```yaml
@@ -118,6 +129,7 @@ Accept wildcard characters: False
118129
```
119130
120131
### -RecoveryPointId
132+
121133
Specifies the recovery point ID.
122134
123135
```yaml
@@ -133,6 +145,7 @@ Accept wildcard characters: False
133145
```
134146
135147
### -StartDate
148+
136149
Specifies the start of the date range.
137150
138151
```yaml
@@ -148,6 +161,7 @@ Accept wildcard characters: False
148161
```
149162
150163
### -VaultId
164+
151165
ARM ID of the Recovery Services Vault.
152166
153167
```yaml
@@ -162,8 +176,9 @@ Accept pipeline input: True (ByValue)
162176
Accept wildcard characters: False
163177
```
164178
165-
### CommonParameters
166-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
179+
### -CommonParameters
180+
181+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
167182
168183
## INPUTS
169184
@@ -182,5 +197,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
182197
[Get-AzRecoveryServicesBackupContainer](./Get-AzRecoveryServicesBackupContainer.md)
183198
184199
[Get-AzRecoveryServicesBackupItem](./Get-AzRecoveryServicesBackupItem.md)
185-
186-

src/RecoveryServices/RecoveryServices/help/Restore-AzRecoveryServicesBackupItem.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ schema: 2.0.0
99
# Restore-AzRecoveryServicesBackupItem
1010

1111
## SYNOPSIS
12+
1213
Restores the data and configuration for a Backup item to a recovery point.
1314

1415
## SYNTAX
1516

1617
### AzureVMParameterSet (Default)
18+
1719
```
1820
Restore-AzRecoveryServicesBackupItem [-VaultLocation <String>] [-RecoveryPoint] <RecoveryPointBase>
1921
[-StorageAccountName] <String> [-StorageAccountResourceGroupName] <String>
@@ -22,6 +24,7 @@ Restore-AzRecoveryServicesBackupItem [-VaultLocation <String>] [-RecoveryPoint]
2224
```
2325

2426
### AzureFileParameterSet
27+
2528
```
2629
Restore-AzRecoveryServicesBackupItem [-VaultLocation <String>] [-RecoveryPoint] <RecoveryPointBase>
2730
-ResolveConflict <RestoreFSResolveConflictOption> [-SourceFilePath <String>]
@@ -31,29 +34,35 @@ Restore-AzRecoveryServicesBackupItem [-VaultLocation <String>] [-RecoveryPoint]
3134
```
3235

3336
### AzureWorkloadParameterSet
37+
3438
```
3539
Restore-AzRecoveryServicesBackupItem [-VaultLocation <String>] [-WLRecoveryConfig] <RecoveryConfigBase>
3640
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3741
```
3842

3943
## DESCRIPTION
44+
4045
The **Restore-AzRecoveryServicesBackupItem** cmdlet restores the data and configuration for an Azure Backup item to a specified recovery point.
4146
This cmdlet starts the restore from the Recovery Services vault to customer's storage account.
4247
The restore operation does not restore the full virtual machine.
4348
It restores the disk data and configuration information.
4449
After the restore operation is finished, you must create the virtual machine and start it.
45-
Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
50+
Set the vault context by using the -VaultId parameter.
51+
52+
Note: To successfully execute this cmdlet in addition to -VaultId parameter -VaultLocation parameter should be used as well.
4653

4754
## EXAMPLES
4855

4956
### Example 1: Restore an item to a recovery point
50-
```
51-
PS C:\>$Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM"
52-
PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM
53-
PS C:\> $StartDate = (Get-Date).AddDays(-7)
57+
58+
```powershell
59+
PS C:\> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
60+
PS C:\>$Container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM" -VaultId $vault.ID
61+
PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM -VaultId $vault.ID
62+
PS C:\> $StartDate = (Get-Date).AddDays(-7)
5463
PS C:\> $EndDate = Get-Date
55-
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime()
56-
PS C:\> $RestoreJob = Restore-AzRecoveryServicesBackupItem -RecoveryPoint $RP[0] -StorageAccountName "DestAccount" -StorageAccountResourceGroupName "DestRG"
64+
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
65+
PS C:\> $RestoreJob = Restore-AzRecoveryServicesBackupItem -RecoveryPoint $RP[0] -StorageAccountName "DestAccount" -StorageAccountResourceGroupName "DestRG" -VaultId $vault.ID -VaultLocation $vault.Location
5766
WorkloadName Operation Status StartTime EndTime
5867
------------ --------- ------ --------- -------
5968
V2VM Restore InProgress 26-Apr-16 1:14:01 PM 01-Jan-01 12:00:00 AM
@@ -70,6 +79,7 @@ The last command restores the disks to the target storage account DestAccount in
7079
## PARAMETERS
7180

7281
### -DefaultProfile
82+
7383
The credentials, account, tenant, and subscription used for communication with azure.
7484

7585
```yaml
@@ -85,8 +95,9 @@ Accept wildcard characters: False
8595
```
8696
8797
### -RecoveryPoint
98+
8899
Specifies the recovery point to which to restore the virtual machine.
89-
To obtain an **AzureRmRecoveryServicesBackupRecoveryPoint** object, use the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet.
100+
To obtain an **AzureRmRecoveryServicesBackupRecoveryPoint** object, use the **Get-AzRecoveryServicesBackupRecoveryPoint** cmdlet.
90101
91102
```yaml
92103
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.RecoveryPointBase
@@ -101,7 +112,12 @@ Accept wildcard characters: False
101112
```
102113
103114
### -ResolveConflict
115+
104116
In case the restored item also exists in the destination, use this to indicate whether to overwrite or not.
117+
The acceptable values for this parameter are:
118+
119+
- Overwrite
120+
- Skip
105121
106122
```yaml
107123
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.RestoreFSResolveConflictOption
@@ -117,6 +133,7 @@ Accept wildcard characters: False
117133
```
118134
119135
### -SourceFilePath
136+
120137
Used for a particular item restore from a file share. The path of the item to be restored within the file share.
121138
122139
```yaml
@@ -132,7 +149,12 @@ Accept wildcard characters: False
132149
```
133150
134151
### -SourceFileType
135-
Used for a particular item restore from a file share. The path of the item to be restored within the file share.
152+
153+
Used for a particular item restore from a file share. The type of the item to be restored within the file share.
154+
The acceptable values for this parameter are:
155+
156+
- File
157+
- Directory
136158
137159
```yaml
138160
Type: System.Nullable`1[Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.SourceFileType]
@@ -148,6 +170,7 @@ Accept wildcard characters: False
148170
```
149171
150172
### -StorageAccountName
173+
151174
Specifies the name of the target Storage account in your subscription.
152175
As a part of the restore process, this cmdlet stores the disks and the configuration information in this Storage account.
153176
@@ -164,6 +187,7 @@ Accept wildcard characters: False
164187
```
165188
166189
### -StorageAccountResourceGroupName
190+
167191
Specifies the name of the resource group that contains the target Storage account in your subscription.
168192
As a part of the restore process, this cmdlet stores the disks and the configuration information in this Storage account.
169193
@@ -180,6 +204,7 @@ Accept wildcard characters: False
180204
```
181205
182206
### -TargetFileShareName
207+
183208
The File Share to which the file share has to be restored to.
184209
185210
```yaml
@@ -195,7 +220,8 @@ Accept wildcard characters: False
195220
```
196221
197222
### -TargetFolder
198-
The folder under which the file share has to be restored to within the targetFileShareName.Leave the variable empty to restore under root folder.
223+
224+
The folder under which the file share has to be restored to within the TargetFileShareName. If the backed-up content is to be restored to a root folder, give the target folder values as an empty string.
199225
200226
```yaml
201227
Type: System.String
@@ -210,6 +236,7 @@ Accept wildcard characters: False
210236
```
211237
212238
### -TargetResourceGroupName
239+
213240
The resource group to which the managed disks are restored. Applicable to backup of VM with managed disks
214241
215242
```yaml
@@ -225,6 +252,7 @@ Accept wildcard characters: False
225252
```
226253
227254
### -TargetStorageAccountName
255+
228256
The storage account to which the file share has to be restored to.
229257
230258
```yaml
@@ -240,6 +268,7 @@ Accept wildcard characters: False
240268
```
241269
242270
### -UseOriginalStorageAccount
271+
243272
Use this switch if the disks from the recovery point are to be restored to their original storage accounts.
244273
245274
```yaml
@@ -255,6 +284,7 @@ Accept wildcard characters: False
255284
```
256285
257286
### -VaultId
287+
258288
ARM ID of the Recovery Services Vault.
259289
260290
```yaml
@@ -270,6 +300,7 @@ Accept wildcard characters: False
270300
```
271301
272302
### -VaultLocation
303+
273304
Location of the Recovery Services Vault.
274305
275306
```yaml
@@ -285,6 +316,7 @@ Accept wildcard characters: False
285316
```
286317
287318
### -WLRecoveryConfig
319+
288320
Recovery config
289321
290322
```yaml
@@ -300,6 +332,7 @@ Accept wildcard characters: False
300332
```
301333
302334
### -Confirm
335+
303336
Prompts you for confirmation before running the cmdlet.
304337
305338
```yaml
@@ -315,6 +348,7 @@ Accept wildcard characters: False
315348
```
316349
317350
### -WhatIf
351+
318352
Shows what would happen if the cmdlet runs. The cmdlet is not run.
319353
320354
```yaml
@@ -329,8 +363,9 @@ Accept pipeline input: False
329363
Accept wildcard characters: False
330364
```
331365
332-
### CommonParameters
333-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
366+
### -CommonParameters
367+
368+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
334369
335370
## INPUTS
336371
@@ -351,5 +386,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
351386
[Get-AzRecoveryServicesBackupItem](./Get-AzRecoveryServicesBackupItem.md)
352387
353388
[Get-AzRecoveryServicesBackupRecoveryPoint](./Get-AzRecoveryServicesBackupRecoveryPoint.md)
354-
355-

0 commit comments

Comments
 (0)