Skip to content

Commit 3abf368

Browse files
Merge pull request #89493 from roygara/cliSnap
Updating with cli changes
2 parents 8e9879a + da2f191 commit 3abf368

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

includes/virtual-machines-disks-incremental-snapshot.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ There are a few differences between an incremental snapshot and a regular snapsh
1818

1919
Incremental snapshots also offer a differential capability, which is uniquely available to managed disks. They enable you to get the changes between two incremental snapshots of the same managed disks, down to the block level. You can use this capability to reduce your data footprint when copying snapshots across regions.
2020

21-
If you haven't yet signed up for the preview and you'd like to start using incremental snapshots, please fill out our [survey](https://aka.ms/mdisnapshotpublicpreview) to get access.
21+
If you haven't yet signed up for the preview and you'd like to start using incremental snapshots, please email us at [email protected] to get access to the public preview.
2222

2323
## Restrictions
2424

@@ -106,6 +106,32 @@ You can also use Azure Resource Manager templates to create an incremental snaps
106106
}
107107
```
108108

109+
## CLI
110+
111+
You can create an incremental snapshot with the Azure CLI using [az snapshot create](https://docs.microsoft.com/cli/azure/snapshot?view=azure-cli-latest#az-snapshot-create). An example command would look like the following:
112+
113+
```bash
114+
az snapshot create -g <exampleResourceGroup> \
115+
-n <exampleSnapshotName> \
116+
-l <exampleLocation> \
117+
--source <exampleVMId> \
118+
--incremental
119+
```
120+
121+
You can also identify what snapshots are incremental snapshots in the CLI with by using the `--query` parameter on [az snapshot show](https://docs.microsoft.com/cli/azure/snapshot?view=azure-cli-latest#az-snapshot-show). You can use that parameter to directly query the **SourceResourceId** and **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 disk with the same name, the value of the **UniqueId** property will change.
122+
123+
Examples of either queries would look like the following:
124+
125+
```bash
126+
az snapshot show -g <exampleResourceGroup> \
127+
-n <yourSnapShotName> \
128+
--query [creationData.sourceResourceId] -o tsv
129+
130+
az snapshot show -g <exampleResourceGroup> \
131+
-n <yourSnapShotName> \
132+
--query [creationData.sourceUniqueId] -o tsv
133+
```
134+
109135
## Next steps
110136

111-
If you haven't yet signed up for the preview and you'd like to start using incremental snapshots, please fill out our [survey](https://aka.ms/mdisnapshotpublicpreview).
137+
If you haven't yet signed up for the preview and you'd like to start using incremental snapshots, please email us at [email protected] to get access to the public preview.

0 commit comments

Comments
 (0)