Not
Bu sayfaya erişim yetkilendirme gerektiriyor. Oturum açmayı veya dizinleri değiştirmeyi deneyebilirsiniz.
Bu sayfaya erişim yetkilendirme gerektiriyor. Dizinleri değiştirmeyi deneyebilirsiniz.
Bu makalede, Azure Kaynak Grafı (ARG) kullanarak Azure kaynaklarınız için ek ücret ödemeden yedekleme bilgilerini sorgulama işlemi açıklanmaktadır. ARG, Azure Kaynak Yönetimi'nin kapsamını genişletir ve birden çok abonelikte kaynakları verimli ve uygun ölçekte keşfetmenizi sağlar.
Yedekleme meta verileri için Azure Kaynak Grafı kullanmanın temel avantajları
Yedekleme meta verilerinizi sorgulamak için ARG kullanmanın temel avantajları şunlardır:
- Kaynak özelliklerine göre gelişmiş filtreleme, gruplandırma ve sıralama özellikleriyle abonelikler arasında kaynakları sorgulayın.
- Etkin yedekleme işleri de dahil olmak üzere gerçek zamanlı yedekleme ayrıntılarına erişin.
- Yedekleme verilerini Sanal Makineler ve Depolama Hesapları gibi ilgili Azure kaynak bilgileriyle birleştirin.
Başlarken
ARG kullanarak yedeklemelerinizi sorgulamaya başlamak için şu adımları izleyin:
Azure portalında Kaynak Grafı Gezgini'ni arayın. ARG sorgu düzenleyicisine yeniden yönlendirmek için aynı seçeneği belirleyin.
Sol bölmede sorgu için kullanılabilen tüm tablolar (ve ilişkili şemaları) görüntülenir.
- RecoveryServicesResources tablosu, iş ayrıntıları, yedekleme örneği ayrıntıları gibi yedeklemeyle ilgili kayıtların çoğunu içerir. ve benzeri.
- Kaynaklar tablosu, Kurtarma Hizmetleri kasaları, Azure Sanal Makineler, Depolama Hesapları gibi tüm üst düzey Azure Kaynakları hakkında bilgi içerir.
Bu tablolardan herhangi birindeki verileri keşfetmek için sorgu düzenleyicisine Kusto sorguları yazın ve Sorgu Çalıştır'a tıklayın.
Bu sorguların çıkışını Kaynak Grafı Gezgini'nden CSV olarak indirebilirsiniz. Bu sorguları, PowerShell, CLI veya SDK gibi ARG tarafından desteklenen tüm otomasyon istemcilerini kullanarak özel otomasyonda da kullanabilirsiniz. Veri kaynağı olarak ARG kullanarak Azure portalında özel çalışma kitapları da oluşturabilirsiniz.
Not
- 14 güne kadar olan yedekleme/geri yükleme işleri sorgu için ARG'de kullanılabilir. Geçmiş kayıtları sorgulamak istiyorsanız Azure İzleyici Günlükleri'ni kullanmanızı öneririz.
- ARG, uygun RBAC haklarına sahip olduğunuz kaynakları sorgulamanıza olanak tanır.
Örnek sorgular
Yedekleme verilerinizde özel panolarda ve otomasyonlarda kullanabileceğiniz bazı örnek ARG sorguları aşağıda verilmiştir.
Yedekleme için yapılandırılmış tüm Azure VM'lerini listeleme
RecoveryServicesResources
| where type in~ ('Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems')
| extend vaultName = case(type =~ 'microsoft.dataprotection/backupVaults/backupInstances',split(split(id, '/Microsoft.DataProtection/backupVaults/')[1],'/')[0],type =~ 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems',split(split(id, '/Microsoft.RecoveryServices/vaults/')[1],'/')[0],'--')
| extend dataSourceType = case(type=~'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems',properties.backupManagementType,type =~ 'microsoft.dataprotection/backupVaults/backupInstances',properties.dataSourceSetInfo.datasourceType,'--')
| extend friendlyName = properties.friendlyName
| extend dsResourceGroup = split(split(properties.dataSourceInfo.resourceID, '/resourceGroups/')[1],'/')[0]
| extend dsSubscription = split(split(properties.dataSourceInfo.resourceID, '/subscriptions/')[1],'/')[0]
| extend lastRestorePoint = properties.lastRecoveryPoint
| extend primaryLocation = properties.dataSourceInfo.resourceLocation
| extend policyName = case(type =~ 'Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems',properties.policyName, type =~ 'microsoft.dataprotection/backupVaults/backupInstances', properties.policyInfo.name, '--')
| extend protectionState = properties.currentProtectionState
| where protectionState in~ ('ConfiguringProtection','ProtectionConfigured','ConfiguringProtectionFailed','ProtectionStopped','SoftDeleted','ProtectionError')
Son bir hafta içinde PostgreSQL için Azure Veritabanları Sunucularındaki tüm yedekleme işlerini listeleme
RecoveryServicesResources
| where type in~ ('Microsoft.DataProtection/backupVaults/backupJobs')
| extend vaultName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs',properties.vaultName,type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',split(split(id, '/Microsoft.RecoveryServices/vaults/')[1],'/')[0],'--')
| extend friendlyName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs',strcat(properties.dataSourceSetName , '/', properties.dataSourceName),type =~ 'Microsoft.RecoveryServices/vaults/backupJobs', properties.entityFriendlyName, '--')
| extend dataSourceType = case(type =~ 'Microsoft.RecoveryServices/vaults/backupJobs',properties.backupManagementType,type =~ 'microsoft.dataprotection/backupVaults/backupJobs',properties.dataSourceType,'--')
| extend backupInstanceName = properties.backupInstanceId
| extend dsResourceGroup = split(split(properties.dataSourceId, '/resourceGroups/')[1],'/')[0]| extend dsSubscription = split(split(properties.dataSourceId, '/subscriptions/')[1],'/')[0]
| extend status = properties.status
| extend dataSourceId = properties.dataSourceId
| extend primaryLocation = properties.dataSourceLocation
| 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
| project id, name, friendlyName, resourceGroup, vaultName, dataSourceType, operation, jobStatus, startTime, duration, backupInstanceName, dsResourceGroup, dsSubscription, status, primaryLocation, dataSourceId
| where (startTime >= ago(7d))
Yedekleme için yapılandırılmamış tüm Azure VM'lerini listeleme
Resources
| where type in~ ('microsoft.compute/virtualmachines','microsoft.classiccompute/virtualmachines')
| extend resourceId=tolower(id)
| join kind = leftouter ( RecoveryServicesResources
| where type == "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems"
| where properties.backupManagementType == "AzureIaasVM"
| project resourceId = tolower(tostring(properties.sourceResourceId)), backupItemid = id, isBackedUp = isnotempty(id) ) on resourceId
| extend isProtected = isnotempty(backupItemid)
| where (isProtected == (0))
| project id,name,resourceGroup,location,tags
Azure VM'leri için kullanılan tüm Yedekleme ilkelerini listeleme
RecoveryServicesResources
| where type == 'microsoft.recoveryservices/vaults/backuppolicies'
| extend vaultName = case(type == 'microsoft.recoveryservices/vaults/backuppolicies', split(split(id, 'microsoft.recoveryservices/vaults/')[1],'/')[0],type == 'microsoft.recoveryservices/vaults/backuppolicies', split(split(id, 'microsoft.recoveryservices/vaults/')[1],'/')[0],'--')
| extend datasourceType = case(type == 'microsoft.recoveryservices/vaults/backuppolicies', properties.backupManagementType,type == 'microsoft.dataprotection/backupVaults/backupPolicies',properties.datasourceTypes[0],'--')
| project id,name,vaultName,resourceGroup,properties,datasourceType
| where datasourceType == 'AzureIaasVM'
Belirli bir yedekleme ilkesiyle ilişkili tüm VM'leri listeleme
RecoveryServicesResources
| where type == "microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems"
| project propertiesJSON = parse_json(properties)
| where propertiesJSON.backupManagementType == "AzureIaasVM"
| project VMID=propertiesJSON.sourceResourceId, PolicyID=propertiesJSON.policyId
| where PolicyID == "<ARM ID of the given policy>"
PostgreSQL için Azure Veritabanları Sunucuları için kullanılan tüm Yedekleme ilkelerini listeleme
RecoveryServicesResources
| where type in~ ('Microsoft.DataProtection/BackupVaults/backupPolicies')
| extend vaultName = case(type =~ 'microsoft.dataprotection/backupVaults/backupPolicies', split(split(id, '/Microsoft.DataProtection/backupVaults/')[1],'/')[0],type =~ 'microsoft.recoveryservices/vaults/backupPolicies', split(split(id, '/Microsoft.RecoveryServices/vaults/')[1],'/')[0],'--')
| extend datasourceType = case(type =~ 'Microsoft.RecoveryServices/vaults/backupPolicies', properties.backupManagementType,type =~ 'microsoft.dataprotection/backupVaults/backupPolicies',properties.datasourceTypes[0],'--')
| project id,name,vaultName,resourceGroup,properties,datasourceType
| where (datasourceType in~ ('Microsoft.DBforPostgreSQL/servers/databases'))