OnCallReadyStart learning

Azure Lesson 32.44 · Azure IV: Governance, Storage & Backup · 14 min read

Watching backups: alerts, reports, and a vault attackers can't empty

In plain words

A smoke alarm with no batteries is not a smoke alarm. Azure Backup already has alarms built in - "last night's backup failed", "someone is deleting backups" - but they only ring in an empty room until you connect them to someone's phone.

The chapter's last lesson connects the alarm, writes every backup into a logbook you can search, and puts extra locks on the vault so a burglar can't empty it before breaking in.

Watching backups: alerts, reports, and a vault attackers can't empty

A backup that silently stopped working three weeks ago is the most common way to "have backups" and still lose data. Agents break, VMs get moved, policies get edited, someone removes protection "for a migration". This lesson makes backup failures page someone, turns the backup estate into a report you can query, and hardens the vault itself. Ransomware gangs delete backups before they encrypt anything.

Need to know:

  • Azure Backup raises built-in Azure Monitor alerts, no alert rule needed: · job failure alerts (Sev1): Backup Failure, Restore Failure. On by default, can be turned off per vault, and not raised when the VM itself was deleted; · security alerts (Sev0): Delete Backup Data, Soft Delete Disabled for Vault, shorter retention, MUA disabled... Always on.
  • Built-in alerts notify nobody until an alert processing rule with Add action groups, scoped to the vault (or its resource group / subscription), routes them to an action group.
  • The old classic alerts (the vault's Backup Alerts tab with email settings) are deprecated (31 March 2026). Notifications go through Azure Monitor now.
  • Reports: a vault's diagnostic settings send backup data to a Log Analytics workspace. Use the resource-specific tables (AddonAzureBackupJobs, CoreAzureBackup, AddonAzureBackupPolicy...), which the Backup Reports workbook and your KQL read. Resiliency (the former Backup center / Business Continuity Center) shows jobs, alerts and items across vaults.

Routing the alerts

$ az vm list -g rg-try-bk --query "[].name" -o tsv
vm-try-app
$ az backup vault create -g rg-try-bk -n rsv-try -l westeurope -o none
$ az backup protection enable-for-vm -g rg-try-bk -v rsv-try --vm vm-try-app --policy-name EnhancedPolicy -o none
$ az backup vault show -g rg-try-bk -n rsv-try --query "properties.monitoringSettings"
{
  "azureMonitorAlertSettings": {
    "alertsForAllJobFailures": "Enabled"
  },
  "classicAlertSettings": {
    "alertsForCriticalOperations": "Disabled"
  }
}
$ az monitor action-group create -g rg-try-bk -n ag-try-backup --short-name backup --action email oncall [email protected] -o none
$ VAULT=$(az backup vault show -g rg-try-bk -n rsv-try --query id -o tsv)
$ az monitor alert-processing-rule create -g rg-try-bk -n route-backup-alerts --rule-type AddActionGroups --action-groups ag-try-backup --scopes $VAULT --description "Backup alerts to on-call" --query "{name:name, actions:properties.actions[0].actionType, scopes:properties.scopes}"
{
  "actions": "AddActionGroups",
  "name": "route-backup-alerts",
  "scopes": [
    "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-try-bk/providers/Microsoft.RecoveryServices/vaults/rsv-try"
  ]
}

alertsForAllJobFailures: Enabled is the per-vault switch for job failure alerts (and the classic alerts are off). Nothing more to configure on the vault: the routing lives in Azure Monitor, so one alert processing rule at the subscription can cover every vault in it.

Now a backup that fails. This lesson's VM, vm-try-app, has a VM agent that stopped answering (the most common cause of VM backup failures), so the next backup job fails, and the alert reaches the action group:

$ az backup protection backup-now -g rg-try-bk -v rsv-try -c vm-try-app -i vm-try-app --backup-management-type AzureIaasVM -o none
$ az backup job wait -g rg-try-bk -v rsv-try -n $(az backup job list -g rg-try-bk -v rsv-try --operation Backup --query "[0].name" -o tsv) --query "properties.{status:status, error:errorDetails[0].errorCode}"
{
  "error": "UserErrorGuestAgentStatusUnavailable",
  "status": "Failed"
}
$ az backup job list -g rg-try-bk -v rsv-try --status Failed --query "[].{operation:properties.operation, item:properties.entityFriendlyName, error:properties.errorDetails[0].errorCode}" -o table
Operation  Item        Error
---------  ----------  ------------------------------------
Backup     vm-try-app  UserErrorGuestAgentStatusUnavailable
$ mail -H
 N   1 Microsoft Azure    Tue Sep 22 20:00  17/769   You've been added to an Azure Monitor ac
>N   2 Microsoft Azure    Tue Sep 22 20:25  28/1272   Fired:Sev1 Azure Monitor Alert Backup Fa

Reports: the backup estate in Log Analytics

$ LAW=$(az monitor log-analytics workspace show -g rg-oncall-lab -n law-sysop --query id -o tsv)
$ az monitor diagnostic-settings create -n backup-reports --resource $VAULT --workspace $LAW --export-to-resource-specific --logs '[{"category":"CoreAzureBackup","enabled":true},{"category":"AddonAzureBackupJobs","enabled":true},{"category":"AddonAzureBackupPolicy","enabled":true}]' --query "{name:name, destination:logAnalyticsDestinationType}"
{
  "destination": "Dedicated",
  "name": "backup-reports"
}
$ W=$(az monitor log-analytics workspace show -g rg-oncall-lab -n law-sysop --query customerId -o tsv)
$ az monitor log-analytics query -w "$W" --analytics-query 'AddonAzureBackupJobs | where JobOperation == "Backup" | summarize jobs = count(), failed = countif(JobStatus == "Failed") by VaultName' -o table
TableName      VaultName  Failed  Jobs
-------------  ---------  ------  ----
PrimaryResult  rsv-try    1       1
$ az monitor log-analytics query -w "$W" --analytics-query 'AddonAzureBackupJobs | where JobStatus == "Failed" | project TimeGenerated, JobOperation, JobFailureCode, BackupItemUniqueId' -o table
BackupItemUniqueId                                                                      JobFailureCode                        JobOperation  TableName      TimeGenerated
--------------------------------------------------------------------------------------  ------------------------------------  ------------  -------------  ------------------------
westeurope;9c2cadf7-101f-40f6-8b37-e98e0970adcb;iaasvmcontainerv2;rg-try-bk;vm-try-app  UserErrorGuestAgentStatusUnavailable  Backup        PrimaryResult  2026-09-22T20:25:26.350Z
  • --export-to-resource-specific writes one table per category (AddonAzureBackupJobs...). Without it everything goes to the shared AzureDiagnostics table, which the Backup Reports workbook doesn't use.
  • Data shows up a little later than the job (the reports are not real-time), so they are for trends and audits: "which items failed more than twice this week", "which VMs have no backup in 3 days", storage consumed per policy. For paging, use the built-in alerts.
  • A log search alert on this table (Azure III) covers what the built-in alerts don't, for example "no successful backup for an item in 26 hours".

A vault attackers can't empty

The playbook against backups: get an admin account, disable soft delete, delete the backup data, then encrypt production. Each layer below breaks one step:

ControlStops
Soft delete (14-180 days), always-on (can't be disabled again)instant deletion of backup data
Immutable vault (locked)deleting recovery points before they expire, shortening retention
Multi-user authorization (MUA) with a Resource Guard in another tenant/subscriptionone admin alone changing critical settings: a second person must approve via the guard
Security alerts (Sev0) routed to people who answerdeleting quietly
Separate RBAC: Backup Operator / Backup Reader for daily work, few Backup Contributorsover-privileged day-to-day accounts
Private endpoints and public network access disabled on the vaultreaching the vault from the internet
$ az backup vault backup-properties show -g rg-try-bk -n rsv-try --query "[0].properties.{softDelete:softDeleteFeatureState, days:softDeleteDuration, enhancedSecurity:enhancedSecurityState}"
{
  "days": 14,
  "enhancedSecurity": "Enabled",
  "softDelete": "Enabled"
}
$ az backup vault backup-properties set -g rg-try-bk -n rsv-try --soft-delete-duration 30 --query "[0].properties.softDeleteDuration" -o tsv
30

On the exam (AZ-104 5.2.7): built-in Azure Monitor alerts for Backup (job failure Sev1, security Sev0), routing them with alert processing rules and action groups, classic alerts deprecated, diagnostic settings to Log Analytics with resource-specific tables, Backup Reports, Resiliency / the Backup center views, plus soft delete and vault security.

In an interview: "A backup has been failing for weeks and nobody noticed. What do you change?" - "Route the built-in Backup Failure and security alerts to on-call with an alert processing rule and an action group, at the subscription so every new vault is covered. Send the vaults' diagnostics to Log Analytics in resource-specific mode, and add a log alert for items with no successful backup in the last day. Then schedule restore tests, because a successful job still doesn't prove the data is usable."

What you can now do

  • Route built-in backup alerts to an action group, and say why nothing arrives without the rule.
  • Send vault diagnostics to Log Analytics and query backup jobs.
  • Harden a vault against deletion: soft delete, immutability, MUA, alerts, least privilege.

Why it helps

The most common way to lose data with backups configured is a backup that silently stopped working weeks ago. Routing the built-in alerts and keeping backup data in Log Analytics turns that into a page the next morning.

Attackers target backups first, so the vault's own protections (soft delete, immutability, multi-user authorization) are part of every ransomware playbook review. Check them before you need them.

Commands in this lesson

az mail

FAQ

Do I have to create alert rules for backup failures?

No. Azure Backup raises built-in Azure Monitor alerts for job failures (Sev1) and security events (Sev0). What you have to create is an alert processing rule that adds an action group, so someone is notified.

Can I turn the built-in alerts off?

Job failure alerts can be turned off per vault (the alertsForAllJobFailures setting), for example if you use your own log alerts instead. Security alerts can't be turned off, only routed or not routed. Route them to people who will answer.

What happened to the old backup alert emails?

Classic alerts (configured on the vault's Backup Alerts page) are deprecated as of 31 March 2026. Notifications for backup alerts go through Azure Monitor: alert processing rules and action groups. One rule at the subscription can cover every vault.

Why resource-specific tables for backup reports?

With --export-to-resource-specific each category gets its own table, such as AddonAzureBackupJobs, with proper columns; that is what the Backup Reports workbook and most queries expect. The legacy mode writes everything to AzureDiagnostics. Pick resource-specific for every vault.

What is multi-user authorization?

A Resource Guard, ideally in another subscription or tenant, that must approve critical operations on the vault, such as disabling soft delete or reducing retention. One compromised admin account is then not enough to destroy backups.

In an interview Mid

A backup has been failing for weeks and nobody noticed. What do you change?

Route the built-in Backup Failure and security alerts to on-call with an alert processing rule and an action group, at the subscription so every new vault is covered. Send the vaults' diagnostics to Log Analytics in resource-specific mode and add a log alert on AddonAzureBackupJobs for items with no successful backup in the last day. Then fix the cause (usually the VM agent) and schedule restore tests, because a successful job still doesn't prove the data is usable.

Also asked: How do you protect backups against ransomware? · Which alerts does Azure Backup raise by itself? · How would you report on backup health across many vaults?

Practise this lesson in the terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.