Skip to content

Commit ba7c95a

Browse files
Merge pull request #245946 from roygara/instantRestore
Instant restore draft
2 parents 155608a + f8be8eb commit ba7c95a

File tree

2 files changed

+8
-123
lines changed

2 files changed

+8
-123
lines changed

articles/virtual-machines/disks-incremental-snapshots.md

Lines changed: 5 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about incremental snapshots for managed disks, including how
44
author: roygara
55
ms.service: azure-disk-storage
66
ms.topic: how-to
7-
ms.date: 08/11/2023
7+
ms.date: 08/17/2023
88
ms.author: rogarana
99
ms.custom: devx-track-azurepowershell, ignite-fall-2021, devx-track-azurecli, ignite-2022, references_regions, devx-track-arm-template
1010
ms.devlang: azurecli
@@ -22,9 +22,9 @@ ms.devlang: azurecli
2222

2323
# [Azure CLI](#tab/azure-cli)
2424

25-
You can use the Azure CLI to create an incremental snapshot. You'll need the latest version of the Azure CLI. See the following articles to learn how to either [install](/cli/azure/install-azure-cli) or [update](/cli/azure/update-azure-cli) the Azure CLI.
25+
You can use the Azure CLI to create an incremental snapshot. You need the latest version of the Azure CLI. See the following articles to learn how to either [install](/cli/azure/install-azure-cli) or [update](/cli/azure/update-azure-cli) the Azure CLI.
2626

27-
The following script will create an incremental snapshot of a particular disk:
27+
The following script creates an incremental snapshot of a particular disk:
2828

2929
```azurecli
3030
# Declare variables
@@ -39,9 +39,6 @@ yourDiskID=$(az disk show -n $diskName -g $resourceGroupName --query "id" --outp
3939
az snapshot create -g $resourceGroupName -n $snapshotName --source $yourDiskID --incremental true
4040
```
4141

42-
> [!IMPORTANT]
43-
> After taking a snapshot of an Ultra Disk, you must wait for the snapshot to complete before you can use it. See the [Check status of snapshots or disks](#check-status-of-snapshots-or-disks) section for details.
44-
4542
You can identify incremental snapshots from the same disk with the `SourceResourceId` property of snapshots. `SourceResourceId` is the Azure Resource Manager resource ID of the parent disk.
4643

4744
You can use `SourceResourceId` to create a list of all snapshots associated with a particular disk. Replace `yourResourceGroupNameHere` with your value and then you can use the following example to list your existing incremental snapshots:
@@ -62,7 +59,7 @@ az snapshot list --query "[?creationData.sourceResourceId=='$diskId' && incremen
6259

6360
# [Azure PowerShell](#tab/azure-powershell)
6461

65-
You can use the Azure PowerShell module to create an incremental snapshot. You'll need the latest version of the Azure PowerShell module. The following command will either install it or update your existing installation to latest:
62+
You can use the Azure PowerShell module to create an incremental snapshot. You need the latest version of the Azure PowerShell module. The following command will either install it or update your existing installation to latest:
6663

6764
```PowerShell
6865
Install-Module -Name Az -AllowClobber -Scope CurrentUser
@@ -85,9 +82,6 @@ $snapshotConfig=New-AzSnapshotConfig -SourceUri $yourDisk.Id -Location $yourDisk
8582
New-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName -Snapshot $snapshotConfig
8683
```
8784

88-
> [!IMPORTANT]
89-
> After taking a snapshot of a Premium SSD v2 or an Ultra Disk, you must wait for the snapshot to complete before you can use it. See the [Check status of snapshots or disks](#check-status-of-snapshots-or-disks) section for details.
90-
9185
You can identify incremental snapshots from the same disk with the `SourceResourceId` and the `SourceUniqueId` properties of snapshots. `SourceResourceId` is the Azure Resource Manager resource ID of the parent disk. `SourceUniqueId` is the value inherited from the `UniqueId` property of the disk. If you delete a disk and then create a new disk with the same name, the value of the `UniqueId` property changes.
9286

9387
You can use `SourceResourceId` and `SourceUniqueId` to create a list of all snapshots associated with a particular disk. Replace `yourResourceGroupNameHere` with your value and then you can use the following example to list your existing incremental snapshots:
@@ -112,9 +106,6 @@ $incrementalSnapshots
112106
# [Portal](#tab/azure-portal)
113107
[!INCLUDE [virtual-machines-disks-incremental-snapshots-portal](../../includes/virtual-machines-disks-incremental-snapshots-portal.md)]
114108

115-
> [!IMPORTANT]
116-
> After taking a snapshot of a Premium SSD v2 or an Ultra Disk, you must wait for the snapshot to complete before you can use it. See the [Check status of snapshots or disks](#check-status-of-snapshots-or-disks) section for details.
117-
118109
# [Resource Manager Template](#tab/azure-resource-manager)
119110

120111
You can also use Azure Resource Manager templates to create an incremental snapshot. You'll need to make sure the apiVersion is set to **2022-03-22** and that the incremental property is also set to true. The following snippet is an example of how to create an incremental snapshot with Resource Manager templates:
@@ -150,109 +141,9 @@ You can also use Azure Resource Manager templates to create an incremental snaps
150141
]
151142
}
152143
```
153-
> [!IMPORTANT]
154-
> After taking a snapshot of a Premium SSD v2 or an Ultra Disk, you must wait for the snapshot to complete before you can use it. See the [Check status of snapshots or disks](#check-status-of-snapshots-or-disks) section for details.
155144

156145
---
157146

158-
## Check status of snapshots or disks
159-
160-
Incremental snapshots of Premium SSD v2 or Ultra Disks can't be used to create new disks until the background process copying the data into the snapshot has completed. Similarly, Premium SSD v2 or Ultra Disks created from incremental snapshots can't be attached to a VM until the background process copying the data into the disk has completed.
161-
162-
You can use either the [CLI](#cli) or [PowerShell](#powershell) sections to check the status of the background copy from a disk to a snapshot and you can use the [Check disk creation status](#check-disk-creation-status) section to check the status of a background copy from a snapshot to a disk.
163-
164-
### CLI
165-
166-
You have two options for getting the status of snapshots. You can either get a [list of all incremental snapshots associated with a specific disk](#cli---list-incremental-snapshots), and their respective status, or you can get the [status of an individual snapshot](#cli---individual-snapshot).
167-
168-
#### CLI - List incremental snapshots
169-
170-
The following script returns a list of all snapshots associated with a particular disk. The value of the `CompletionPercent` property of any snapshot must be 100 before it can be used. Replace `yourResourceGroupNameHere`, `yourSubscriptionId`, and `yourDiskNameHere` with your values then run the script:
171-
172-
```azurecli
173-
# Declare variables and create snapshot list
174-
subscriptionId="yourSubscriptionId"
175-
resourceGroupName="yourResourceGroupNameHere"
176-
diskName="yourDiskNameHere"
177-
178-
az account set --subscription $subscriptionId
179-
180-
diskId=$(az disk show -n $diskName -g $resourceGroupName --query [id] -o tsv)
181-
182-
az snapshot list --query "[?creationData.sourceResourceId=='$diskId' && incremental]" -g $resourceGroupName --output table
183-
```
184-
185-
#### CLI - Individual snapshot
186-
187-
You can also check the status of an individual snapshot by checking the `CompletionPercent` property. Replace `$sourceSnapshotName` with the name of your snapshot then run the following command. The value of the property must be 100 before you can use the snapshot for restoring disk or generate a SAS URI for downloading the underlying data.
188-
189-
```azurecli
190-
az snapshot show -n $sourceSnapshotName -g $resourceGroupName --query [completionPercent] -o tsv
191-
```
192-
193-
### PowerShell
194-
195-
You have two options for getting the status of snapshots. You can either get a [list of all incremental snapshots associated with a particular disk](#powershell---list-incremental-snapshots) and their respective status, or you can get the [status of an individual snapshot](#powershell---individual-snapshots).
196-
197-
#### PowerShell - List incremental snapshots
198-
199-
The following script returns a list of all incremental snapshots associated with a particular disk that haven't completed their background copy. Replace `yourResourceGroupNameHere` and `yourDiskNameHere`, then run the script.
200-
201-
```azurepowershell
202-
$resourceGroupName = "yourResourceGroupNameHere"
203-
$snapshots = Get-AzSnapshot -ResourceGroupName $resourceGroupName
204-
$diskName = "yourDiskNameHere"
205-
206-
$yourDisk = Get-AzDisk -DiskName $diskName -ResourceGroupName $resourceGroupName
207-
208-
$incrementalSnapshots = New-Object System.Collections.ArrayList
209-
210-
foreach ($snapshot in $snapshots)
211-
{
212-
if($snapshot.Incremental -and $snapshot.CreationData.SourceResourceId -eq $yourDisk.Id -and $snapshot.CreationData.SourceUniqueId -eq $yourDisk.UniqueId)
213-
{
214-
$targetSnapshot=Get-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName
215-
{
216-
if($targetSnapshot.CompletionPercent -lt 100)
217-
{
218-
$incrementalSnapshots.Add($targetSnapshot)
219-
}
220-
}
221-
}
222-
}
223-
224-
$incrementalSnapshots
225-
```
226-
227-
#### PowerShell - individual snapshots
228-
229-
You can check the `CompletionPercent` property of an individual snapshot to get its status. Replace `yourResourceGroupNameHere` and `yourSnapshotName` then run the script. The value of the property must be 100 before you can use the snapshot for restoring disk or generate a SAS URI for downloading the underlying data.
230-
231-
```azurepowershell
232-
$resourceGroupName = "yourResourceGroupNameHere"
233-
$snapshotName = "yourSnapshotName"
234-
235-
$targetSnapshot=Get-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName
236-
237-
$targetSnapshot.CompletionPercent
238-
```
239-
240-
### Check disk creation status
241-
242-
When creating a disk from either a Premium SSD v2 or an Ultra Disk snapshot, you must wait for the background copy process to complete before you can attach it. Currently, you must use the Azure CLI to check the progress of the copy process.
243-
244-
The following script gives you the status of an individual disk's copy process. The value of `completionPercent` must be 100 before the disk can be attached.
245-
246-
```azurecli
247-
subscriptionId=yourSubscriptionID
248-
resourceGroupName=yourResourceGroupName
249-
diskName=yourDiskName
250-
251-
az account set --subscription $subscriptionId
252-
253-
az disk show -n $diskName -g $resourceGroupName --query [completionPercent] -o tsv
254-
```
255-
256147
## Check sector size
257148

258149
Snapshots with a 4096 logical sector size can only be used to create Premium SSD v2 or Ultra Disks. They can't be used to create other disk types. Snapshots of disks with 4096 logical sector size are stored as VHDX, whereas snapshots of disks with 512 logical sector size are stored as VHD. Snapshots inherit the logical sector size from the parent disk.
@@ -269,6 +160,6 @@ az snapshot show -g resourcegroupname -n snapshotname --query [creationData.logi
269160

270161
See [Copy an incremental snapshot to a new region](disks-copy-incremental-snapshot-across-regions.md) to learn how to copy an incremental snapshot across regions.
271162

272-
If you have additional questions on snapshots, see the [snapshots](faq-for-disks.yml#snapshots) section of the FAQ.
163+
If you have more questions on snapshots, see the [snapshots](faq-for-disks.yml#snapshots) section of the FAQ.
273164

274165
If you'd like to see sample code demonstrating the differential capability of incremental snapshots, using .NET, see [Copy Azure Managed Disks backups to another region with differential capability of incremental snapshots](https://github.com/Azure-Samples/managed-disks-dotnet-backup-with-incremental-snapshots).

includes/virtual-machines-disks-incremental-snapshots-restrictions.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
author: roygara
66
ms.service: virtual-machines
77
ms.topic: include
8-
ms.date: 08/11/2023
8+
ms.date: 08/17/2023
99
ms.author: rogarana
10-
ms.custom: include file, references_regions
10+
ms.custom: include file
1111
---
1212

1313
- Incremental snapshots currently can't be moved between subscriptions.
@@ -25,16 +25,10 @@ Incremental snapshots of Premium SSD v2 and Ultra Disks have the following extra
2525
- Currently, incremental snapshots of Premium SSD v2 and Ultra Disks can't be taken in the Azure portal.
2626
- Snapshots with a 512 logical sector size are stored as VHD, and can be used to create any disk type. Snapshots with a 4096 logical sector size are stored as VHDX and can only be used to create Ultra Disks and Premium SSD v2 disks, they can't be used to create other disk types. To determine which sector size your snapshot is, see [check sector size](#check-sector-size).
2727
- Up to five disks may be simultaneously created from a snapshot of a Premium SSD v2 or an Ultra Disk.
28-
- When an incremental snapshot of either a Premium SSD v2 or an Ultra Disk is created, a background copy process for that disk is started. While a background copy is ongoing, you can have up to three total snapshots pending. The process must complete before any more snapshots of that disk can be created.
29-
- Incremental snapshots of a Premium SSD v2 or an Ultra disk can't be used immediately after they're created. The background copy must complete before you can create a disk from the snapshot. See [Check status of snapshots or disks](#check-status-of-snapshots-or-disks) for details.
30-
- Disks created from an incremental snapshot of a Premium SSD v2 or an Ultra Disk can't be immediately attached to a VM once it's created. The background copy must complete before it can be attached. See [Check disk creation status](#check-disk-creation-status) for details.
3128

3229
> [!NOTE]
3330
> Normally, when you take an incremental snapshot, and there aren't any changes, the size of that snapshot is 0 MiB. Currently, empty snapshots of disks with a 4096 logical sector size instead have a size of 6 MiB, when they'd normally be 0 MiB.
3431
3532
#### Regional availability
3633

37-
Incremental snapshots of Premium SSD v2 and Ultra Disks are currently available in the following regions:
38-
39-
- Incremental snapshots of Ultra Disks are currently only available in North Europe, West Europe, Sweden Central, East US, East US 2, North Central US, South Central US, and West US 2.
40-
- Incremental snapshots of Premium SSD v2 disks are currently only available in North Europe, West Europe, Central US, East US, East US 2, West US 2.
34+
Incremental snapshots of Premium SSD v2 and Ultra Disks are currently available in every region that Premium SSD v2 and Ultra Disks are available.

0 commit comments

Comments
 (0)