Azure Backup - Retained backup jobs

Siva 646 Reputation points

Hi Team,

Do we have any script to get all the retained backup job with retain till date.? with backup size.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,076 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luke Murray 10,276 Reputation points MVP

    Try the below:

    $rsvname = "rsv-infra-prod-01"
    $infrargname = "rg-infra-prod-sc-01"
    $vault = Get-AzRecoveryServicesVault -Name $rsvname -ResourceGroupName $infrargname
    Set-AzRecoveryServicesVaultContext -Vault $vault
    $backupcontainer = Get-AzRecoveryServicesBackupContainer `
        -ContainerType "AzureVM" `
        -FriendlyName vmdcprod01
    $item = Get-AzRecoveryServicesBackupItem `
        -Container $backupcontainer `
        -WorkloadType "AzureVM"
    Get-AzRecoveryServicesBackupRecoveryPoint -Item $item -RecoveryPointId 7701367240882239739

    Reference: [

    Note: I don't have any retention points in my test Azure subscription to reference against, but the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet, does point to the correct one to use.

    Let me know how it goes.

0 additional answers

Sort by: Most helpful