Skip to content

Commit 47f5774

Browse files
Merge pull request #272914 from AbhishekMallick-MS/Apr-22-2024-Git
Addressed Git issue #119526
2 parents 7cc15d7 + b3e6281 commit 47f5774

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

articles/backup/query-backups-using-azure-resource-graph.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Query your backups using Azure Resource Graph (ARG)
33
description: Learn more about querying information on backup for your Azure resources using Azure Resource Group (ARG).
44
ms.topic: conceptual
5-
ms.date: 05/21/2021
5+
ms.date: 04/22/2024
66
author: AbhishekMallick-MS
77
ms.author: v-abhmallick
88
---
@@ -57,7 +57,6 @@ RecoveryServicesResources
5757
| extend policyName = case(type =~ 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems',properties.policyName, type =~ 'microsoft.dataprotection/backupVaults/backupInstances', properties.policyInfo.name, '--')
5858
| extend protectionState = properties.currentProtectionState
5959
| where protectionState in~ ('ConfiguringProtection','ProtectionConfigured','ConfiguringProtectionFailed','ProtectionStopped','SoftDeleted','ProtectionError')
60-
| where (dsSubscription in~ ('00000000-0000-0000-0000-000000000000')) and (dataSourceType in~ ('AzureIaasVM')) //add the relevant subscription ids you wish to query to this line
6160
6261
```
6362

@@ -76,7 +75,6 @@ RecoveryServicesResources
7675
| extend primaryLocation = properties.dataSourceLocation
7776
| extend jobStatus = case (properties.status == 'Completed' or properties.status == 'CompletedWithWarnings','Succeeded',properties.status == 'Failed','Failed',properties.status == 'InProgress', 'Started', properties.status), operation = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs' and tolower(properties.operationCategory) =~ 'backup' and properties.isUserTriggered == 'true',strcat('adhoc',properties.operationCategory),type =~ 'microsoft.dataprotection/backupVaults/backupJobs', tolower(properties.operationCategory), type =~ 'Microsoft.RecoveryServices/vaults/backupJobs' and tolower(properties.operation) =~ 'backup' and properties.isUserTriggered == 'true',strcat('adhoc',properties.operation),type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',tolower(properties.operation), '--'),startTime = todatetime(properties.startTime),endTime = properties.endTime, duration = properties.duration
7877
| project id, name, friendlyName, resourceGroup, vaultName, dataSourceType, operation, jobStatus, startTime, duration, backupInstanceName, dsResourceGroup, dsSubscription, status, primaryLocation, dataSourceId
79-
| where (dsSubscription in~ ('00000000-0000-0000-0000-000000000000')) and (dataSourceType in~ ('Microsoft.DBforPostgreSQL/servers/databases')) and (status in~ ('Started','InProgress','Succeeded','Completed','Failed','CompletedWithWarnings')) and (operation in~ ('adhocBackup','backup')) //add the relevant subscription ids you wish to query to this line
8078
| where (startTime >= ago(7d))
8179
8280
```
@@ -133,4 +131,4 @@ RecoveryServicesResources
133131

134132
## Next steps
135133

136-
[Learn more about Azure Resource Graph](../governance/resource-graph/overview.md)
134+
[Learn more about Azure Resource Graph](../governance/resource-graph/overview.md)

0 commit comments

Comments
 (0)