SOLVED

Command to list backups for the past number of days.

Copper Contributor

Hi, I'm trying to figure out how to generate a report in Log Analytics/PowerShell that will list VM's that have backed up successfully and which did not. Does anyone have an idea of how I can do this via PowerShell or using Log Analytics?

1 Reply
best response confirmed by Richard Oros (Copper Contributor)
Solution

Hi Richard,

If you backup through Azure, Log Analytics has a solution you can install, named "Azure Backup Monitoring solution" with a dashboard of many backup details:

Azure backup monitoring solution.png
You can drill through the charts to see the raw query and results in Log Analytics, or write a custom query like this:

AzureDiagnostics
| where TimeGenerated > ago(6d) 
| where Category == "AzureBackupReport"
| where OperationName == "Job"
| where JobOperation_s == "Backup"
| summarize AggregatedValue = dcount(JobUniqueId_g) by JobStatus_s
| order by AggregatedValue desc

which counts how many backup jobs were successful or failed.

If you backup through another process, you can track the events reported on the Event / SecurityEvent tables.

1 best response

Accepted Solutions
best response confirmed by Richard Oros (Copper Contributor)
Solution

Hi Richard,

If you backup through Azure, Log Analytics has a solution you can install, named "Azure Backup Monitoring solution" with a dashboard of many backup details:

Azure backup monitoring solution.png
You can drill through the charts to see the raw query and results in Log Analytics, or write a custom query like this:

AzureDiagnostics
| where TimeGenerated > ago(6d) 
| where Category == "AzureBackupReport"
| where OperationName == "Job"
| where JobOperation_s == "Backup"
| summarize AggregatedValue = dcount(JobUniqueId_g) by JobStatus_s
| order by AggregatedValue desc

which counts how many backup jobs were successful or failed.

If you backup through another process, you can track the events reported on the Event / SecurityEvent tables.

View solution in original post