Skip to content

Commit 7a4c881

Browse files
Merge pull request #225209 from roygara/snapshotClarity
Snapshot clarity
2 parents 3723bdd + 0943871 commit 7a4c881

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,11 @@ You can use either the [CLI](#cli) or [PowerShell](#powershell) sections to chec
164164

165165
### CLI
166166

167-
First, get a list of all snapshots associated with a particular disk. Replace `yourResourceGroupNameHere` with your value and then you can use the following script to list your existing incremental snapshots of Ultra Disks:
167+
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).
168168

169+
#### CLI - List incremental snapshots
170+
171+
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:
169172

170173
```azurecli
171174
# Declare variables and create snapshot list
@@ -180,15 +183,21 @@ diskId=$(az disk show -n $diskName -g $resourceGroupName --query [id] -o tsv)
180183
az snapshot list --query "[?creationData.sourceResourceId=='$diskId' && incremental]" -g $resourceGroupName --output table
181184
```
182185

183-
Now that you have a list of snapshots, you can check the `CompletionPercent` property of an individual snapshot to get its status. Replace `$sourceSnapshotName` with the name of your snapshot. 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.
186+
#### CLI - Individual snapshot
187+
188+
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.
184189

185190
```azurecli
186191
az snapshot show -n $sourceSnapshotName -g $resourceGroupName --query [completionPercent] -o tsv
187192
```
188193

189194
### PowerShell
190195

191-
The following script creates 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.
196+
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).
197+
198+
#### PowerShell - List incremental snapshots
199+
200+
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.
192201

193202
```azurepowershell
194203
$resourceGroupName = "yourResourceGroupNameHere"
@@ -216,7 +225,9 @@ foreach ($snapshot in $snapshots)
216225
$incrementalSnapshots
217226
```
218227

219-
Now that you have a list of snapshots, 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.
228+
#### PowerShell - individual snapshots
229+
230+
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.
220231

221232
```azurepowershell
222233
$resourceGroupName = "yourResourceGroupNameHere"

0 commit comments

Comments
 (0)