azurebackupazure-powershellsnapshotvhd

Azure Incremental Snapshot Is Same Size as Full?


I am working on creating backup system for Azure VMs. Instead of using Azure Backup Vault, I am trying to see if I can save some cost by creating an Automation runbook that will take the snapshot of the VMs (New-AzSnapShot), then move those images and store them into a storage account as .vhd files. Hopefully this will cost less than using Vault. I was able to create a Powershell script that performs the task as either Full or Incremental snapshot config, but for some reason Incremental snapshot appears to take up the same space as Full snapshot (127GB).

Here is the resulting output for a Full snapshot:

ResourceGroupName            : Koss-Lab-RG
ManagedBy                    :
Sku                          : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated                  : 6/16/2020 11:41:38 AM
OsType                       : Windows
HyperVGeneration             : V1
CreationData                 : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB                   : 127
DiskSizeBytes                : 136367308800
UniqueId                     : [SNIP]
EncryptionSettingsCollection :
ProvisioningState            : Succeeded
Incremental                  : False
Encryption                   : Microsoft.Azure.Management.Compute.Models.Encryption
Id                           : [SNIP]/Microsoft.Compute/snapshots/vm02-Lab-VM-Full-Snapshot-OS-2020-06-16      
Name                         : vm02-Lab-VM-Full-Snapshot-OS-2020-06-16
Type                         : Microsoft.Compute/snapshots
Location                     : westus
Tags                         : {}

How this is the output for an Incremental snapshot:

ResourceGroupName            : Koss-Lab-RG
ManagedBy                    :
Sku                          : Microsoft.Azure.Management.Compute.Models.SnapshotSku
TimeCreated                  : 6/16/2020 11:44:39 AM
OsType                       : Windows
HyperVGeneration             : V1
CreationData                 : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB                   : 127
DiskSizeBytes                : 136367308800
UniqueId                     : [SNIP]
EncryptionSettingsCollection :
ProvisioningState            : Succeeded
Incremental                  : True
Encryption                   : Microsoft.Azure.Management.Compute.Models.Encryption
Id                           : [SNIP]/providers/Microsoft.Compute/snapshots/vm02-Lab-VM-Incremental-Snapshot-OS-2020-06- 
                               16
Name                         : vm02-Lab-VM-Incremental-Snapshot-OS-2020-06-16
Type                         : Microsoft.Compute/snapshots
Location                     : westus
Tags                         : {}

Note Incremental is set to True, but DiskSizeGB is still 127 and DiskSizeBytes is the same as Full snapshot. After I convert them and upload to a storage account container, they both show the same file size of 127GB.

Get-AzStorageBlobCopyState task status :
    Total: 1. Successful: 0. Failed: 0. Active: 1.
 'Pending' copy to blob 'vm02-Lab-VM-Incremental-Snapshot-OS-2020-06-16.vhd' in container 'snapshot-backups' from 'https://[SNIP].blob.core.windows.net/?snapshot=2020-06
    Percent:0%. BytesCopied: 807157248Bytes. TotalBytes: 136367309312Bytes.
    [                                                                                                                                                                                       ]     

Am I doing something wrong? Is the incremental snapshot expanding to the full disk size when I convert it to .vhd at the storage account? Should I just stick with Azure Backup Vault? I imagine it would be quite expensive to have several backup blobs worth 127GB each in the storage account...

Thanks!


Solution

  • Note Incremental is set to True, but DiskSizeGB is still 127 and DiskSizeBytes is the same as Full snapshot. After I convert them and upload to a storage account container, they both show the same file size of 127GB. Am I doing something wrong?

    Even though the disk size of incremental snapshot is same as that of the original disk, the data contained in the snapshot will be the differential data and not the full data. It is not going to cost you the same because you're only paying for just the differential data stored in that snapshot.