Get Azure Backup Size using Powershell

Kalaimani Thirupathi 411 Reputation points
2021-08-25T15:56:05.77+00:00

Dear All,

Is there any way to get the azure VM backup size using PowerShell? Can someone help me with this, please?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,807 questions
Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,132 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Monalla-MSFT 11,646 Reputation points
    2021-08-27T18:50:23.627+00:00

    @Kalaimani Thirupathi - Thanks for reaching out.

    The below command Get-AzRecoveryServicesBackupJobDetail cmdlet gets Azure Backup job details for a specified job. Set the vault context by using the -VaultId parameter.

    Get-AzRecoveryServicesBackupJobDetail
    [-Job] <JobBase>
    [-UseSecondaryRegion]
    [-VaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

    And for a total accumulated size, we dont a specific single command for that.

    But, please go through the document for more details : Configure-Reports

    Hope this helps.

    If the above response helped, Please feel free to "Accept as Answer" so it can be beneficial to the community.


  2. Monalla-MSFT 11,646 Reputation points
    2021-08-30T16:40:58.08+00:00

    @Kalaimani Thirupathi - Thanks for providing your response.

    • If you're referring to getting the backup storage consumed per VM - currently the only way to get this is using Log Analytics. You can configure your vaults to send data to an LA workspace and then query the workspace to get storage consumed per VM.
      backup-azure-diagnostic-events
      Once data is flowing into an LA workspace, you can use LA APIs to query this data programmatically, or you can use the out-of-box reporting solution.
    • But there is no direct way to get the backup size for a particular restore point. But they can get the amount of data transferred by a backup job which is indicative of the restore point size. Like I mentioned above, using

    Get-AzRecoveryServicesBackupJobDetail

    command, you can use the job etails. properties field which contains a property called 'Backup size'

    Hope this helps.

    If the above response helped, Please feel free to "Accept as Answer" so it can be beneficial to the community or feel free to reach back out for any further questions.