skip to Main Content

At 08:00 AM we take a disk snapshot with this azure cli command:

az snapshot create -g RG1 -n snapshot_0800 –source DISK1

Can you help me to understand how I can create a snapshot at 09:00 AM to provide an incremental snapshot named snapshot_0900 of disk DISK1 ?

At the moment looks like the sanpshot taken at 9 is a full backup

2

Answers


  1. I have created snapshot with the sample name of snapshot_1600 like below:

    enter image description here

    Can you help me to understand how I can create a snapshot at 09:00 AM to provide an incremental snapshot named snapshot_0900 of disk DISK1 ?

    Yes, you can create an incremental snapshot named snapshot_0900 of disk DISK1. Up to seven incremental snapshots per disk can be created every five minutes. Total of 500 incremental snapshots can be created for a single disk.

    To create an incremental disk, make use of --incremental parameter with the az snapshot create command like below:

    # Declare variables
    diskName="yourDiskNameHere"
    resourceGroupName="yourResourceGroupNameHere"
    snapshotName="desiredSnapshotNameHere"
    
    # Get the disk you need to backup
    yourDiskID=$(az disk show -n $diskName -g $resourceGroupName --query "id" --output tsv)
    
    # Create the snapshot
    az snapshot create -g $resourceGroupName -n $snapshotName --source $yourDiskID --incremental true
    

    Output:

    enter image description here

    {
      "completionPercent": null,
      "copyCompletionError": null,
      "creationData": {
        "createOption": "Copy",
        "galleryImageReference": null,
        "imageReference": null,
        "logicalSectorSize": null,
        "securityDataUri": null,
        "sourceResourceId": ,
        "sourceUniqueId": "27f4560f-a",
        "sourceUri": null,
        "storageAccountId": null,
        "uploadSizeBytes": null
      },
      "encryptionSettingsCollection": null,
      "extendedLocation": null,
      "hyperVGeneration": "V1",
      "id": "/subscriptions/b83c1ed5ba-2b83a074c23f/resourceGroups/V-IMRAN-providers/Microsoft.Compute/snapshots/snapshot_1700",
      "incremental": true,
      "location": "eastus",
      "managedBy": null,
      "name": "snapshot_1700",
      "networkAccessPolicy": "AllowAll",
      "osType": "Windows",
      "provisioningState": "Succeeded",
      "publicNetworkAccess": "Enabled",
      "purchasePlan": null,
      "resourceGroup": "V-IMRAN"
      "securityProfile": null,
      "sku": {
        "name": "Standard_LRS",
        "tier": "Standard"
      },
      "supportedCapabilities": {
        "acceleratedNetwork": true,
        "architecture": "x64",
        "diskControllerTypes": "SCSI, NVMe"
      },
      "supportsHibernation": true,
      "tags": {},
      "timeCreated": "2023-11-08T11:49:29.144327+00:00",
      "type": "Microsoft.Compute/snapshots",
      "uniqueId": "954bf165-c4c700fec01"
    }
    

    To know more in detail, check the below:

    Create an incremental snapshot – Azure Virtual Machines | Microsoft Learn

    Login or Signup to reply.
  2. Snapshot to create at 08:00 AM:

    az snapshot create -g RG1 -n snapshot_0800 –source DISK1 –incremental true

    Snapshot to create at 09:00 AM:

    az snapshot create -g RG1 -n snapshot_0900 –source snapshot_0800 –incremental true –copy-start true

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search