You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/disks-incremental-snapshots.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,8 +164,11 @@ You can use either the [CLI](#cli) or [PowerShell](#powershell) sections to chec
164
164
165
165
### CLI
166
166
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).
168
168
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:
169
172
170
173
```azurecli
171
174
# Declare variables and create snapshot list
@@ -180,15 +183,21 @@ diskId=$(az disk show -n $diskName -g $resourceGroupName --query [id] -o tsv)
180
183
az snapshot list --query "[?creationData.sourceResourceId=='$diskId' && incremental]" -g $resourceGroupName --output table
181
184
```
182
185
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.
184
189
185
190
```azurecli
186
191
az snapshot show -n $sourceSnapshotName -g $resourceGroupName --query [completionPercent] -o tsv
187
192
```
188
193
189
194
### PowerShell
190
195
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.
192
201
193
202
```azurepowershell
194
203
$resourceGroupName = "yourResourceGroupNameHere"
@@ -216,7 +225,9 @@ foreach ($snapshot in $snapshots)
216
225
$incrementalSnapshots
217
226
```
218
227
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.
0 commit comments