Stay organized with collections
Save and categorize content based on your preferences.
This page explains how to view the protected resource logs for vaulted backups
in Cloud Logging. These logs provide insights of the resources protected
and have their backups stored in the backup vault using the
backup plans. You
can view these logs in the project where the backup vault is created.
If you want to view the backups logs of the resources that are protected using the
backup template in the management console, see
Protected resource logs.
Permissions and roles
You need the IAM permission roles/logging.viewer to view the
protected resource logs. The Logs Viewer role gives you read-only access to
view protected resource logs of all resources protected by backup plan in your
backup vault project. For more information about the IAM
permissions and roles that apply to protected resource logs data, see
Access control with IAM.
View protected resource logs
You can view Backup and DR protected resource logs in Cloud Logging by using
the Google Cloud console and the Google Cloud CLI. To view the protected resource log,
select the project where the backup vault is created.
Console
In the Google Cloud console, you can use the Logs Explorer to retrieve the
protected resource logs entries for your vaulted backups:
In the Google Cloud console, go to the Logging > Logs Explorer.
Select an existing Cloud project, where the backup vault is created.
In the Query builder pane, select bdr_protected_resource from the Select log name drop-down.
gcloud
The Google Cloud CLI provides a command-line interface to the logging API.
To read your protected resource log entries of a project, run the following
command:
PROJECT_ID: the name of the project where the backup vault is created.
Protected resource log format
Protected resource log entries include the following fields:
Field
Description
sourceResourceLocation
The location of the source resource.
sourceResourceId
The ID of the source resource.
currentBackupVaultName
The relative name of the backup vault that is associated with the source resource.
currentBackupRuleDetails
The backup rule details of the backup plan that is associated with the source resource.
ruleName
The name of the backup rule used to backup jobs.
retentionDays
The duration in days for which the backups should be retained in the backup vault before they are deleted.
recurrenceSchedule
The recurrence schedule of a backup based on the backup rule.
backupWindow
The backup window where you have defined the timeframe of when backup jobs can start. The backup window uses the 24-hour clock format, with start and end times between 00 and 24 hours, and a minimum of six hours for the window.
recurrence
The backup recurrence type, which can be hourly, daily, weekly, monthly, or yearly.
lastProtectedOn
The timestamp when the resource was last protected, which is in the YYYY-MM-DDTHH:MM:SS.SSSZ format.
currentBackupPlanName
The relative name of the backup plan that is associated with the source resource.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThis page outlines how to access and view protected resource logs for vaulted backups within Cloud Logging, providing a way to monitor resources safeguarded by backup plans.\u003c/p\u003e\n"],["\u003cp\u003eTo view these logs, you need the \u003ccode\u003eroles/logging.viewer\u003c/code\u003e IAM permission and must access them in the project where the backup vault was created.\u003c/p\u003e\n"],["\u003cp\u003eProtected resource logs can be accessed using the Google Cloud console's Logs Explorer by selecting the \u003ccode\u003ebdr_protected_resource\u003c/code\u003e log name or through the Google Cloud CLI with the command \u003ccode\u003egcloud logging read "logName: bdr_protected_resource" --project=<var translate="no">PROJECT_ID</var>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach protected resource log entry contains details like the \u003ccode\u003esourceResourceLocation\u003c/code\u003e, \u003ccode\u003esourceResourceId\u003c/code\u003e, \u003ccode\u003ecurrentBackupVaultName\u003c/code\u003e, \u003ccode\u003elastProtectedOn\u003c/code\u003e timestamp, and other relevant backup rule information.\u003c/p\u003e\n"],["\u003cp\u003eYou can create custom queries to filter logs based on specific backup plans or backup vaults using the \u003ccode\u003elogName:"bdr_protected_resource"\u003c/code\u003e prefix, along with relevant fields to specify search criteria.\u003c/p\u003e\n"]]],[],null,["# Protected resource logs for vaulted backups\n\nThis page explains how to view the protected resource logs for vaulted backups\nin Cloud Logging. These logs provide insights of the resources protected\nand have their backups stored in the backup vault using the\n[backup plans](/backup-disaster-recovery/docs/cloud-console/backup-plan). You\ncan view these logs in the project where the backup vault is created.\n\nIf you want to view the backups logs of the resources that are protected using the\nbackup template in the management console, see\n[Protected resource logs](/backup-disaster-recovery/docs/monitor-reports/protected-resource-logs).\n\nPermissions and roles\n---------------------\n\nYou need the IAM permission `roles/logging.viewer` to view the\nprotected resource logs. The `Logs Viewer` role gives you read-only access to\nview protected resource logs of all resources protected by backup plan in your\nbackup vault project. For more information about the IAM\npermissions and roles that apply to protected resource logs data, see\n[Access control with IAM](/logging/docs/access-control).\n\nView protected resource logs\n----------------------------\n\nYou can view Backup and DR protected resource logs in Cloud Logging by using\nthe Google Cloud console and the Google Cloud CLI. To view the protected resource log,\nselect the project where the backup vault is created. \n\n### Console\n\nIn the Google Cloud console, you can use the **Logs Explorer** to retrieve the\nprotected resource logs entries for your vaulted backups:\n\n1. In the Google Cloud console, go to the **Logging** \\\u003e **Logs Explorer**.\n2. Select an existing Cloud project, where the backup vault is created.\n3. In the **Query builder** pane, select **bdr_protected_resource** from the **Select log name** drop-down.\n\n### gcloud\n\nThe Google Cloud CLI provides a command-line interface to the logging API.\nTo read your protected resource log entries of a project, run the following\ncommand: \n\n gcloud logging read \"logName: bdr_protected_resource\" --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the name of the project where the backup vault is created.\n\nProtected resource log format\n-----------------------------\n\nProtected resource log entries include the following fields:\n\nThe following sample is an example of a log entry for viewing protected\nresources stored in the backup vault `doc-test`. \n\n {\n \"insertId\": \"15471111095544249995\",\n \"jsonPayload\": {\n \"lastProtectedOn\": \"2024-08-21T06:51:54Z\",\n \"currentBackupRuleDetails\": [\n {\n \"backupWindow\": \"01:00 to 23:00\",\n \"retentionDays\": 14,\n \"recurrence\": \"Hourly\",\n \"recurrenceSchedule\": \"Every 6 hours\",\n \"backupWindowTimezone\": \"Etc/UTC\",\n \"ruleName\": \"random-plan\"\n }\n ],\n \"sourceResourceDataSizeGib\": 10,\n \"currentBackupPlanName\": \"projects/Backupvault_project_ID/locations/us-central1/backupPlans/backup-plan\",\n \"resourceType\": \"Compute Engine\",\n \"currentBackupVaultName\": \"projects/Backupvault_project_ID/locations/us-central1/backupVaults/doc-set\",\n \"sourceResourceLocation\": \"us-central1-a\",\n \"sourceResourceId\": \"1606474933247566298\",\n \"sourceResourceName\": \"projects/Source_project_ID/zones/us-central1-a/instances/farhanmd-log-test--instance\",\n \"@type\": \"type.googleapis.com/google.cloud.backupdr.logging.v1.BDRProtectedResourceLog\"\n },\n \"resource\": {\n \"type\": \"backupdr.googleapis.com/BackupPlan\",\n \"labels\": {\n \"location\": \"us-central1\",\n \"backup_plan_id\": \"backup-plan\",\n \"resource_container\": \"236738525349\"\n }\n },\n \"timestamp\": \"2024-11-05T10:39:03Z\",\n \"severity\": \"INFO\",\n \"logName\": \"projects/Backupvault_Name/logs/backupdr.googleapis.com%2Fbdr_protected_resource\",\n \"receiveTimestamp\": \"2024-11-05T10:50:34.275819255Z\"\n }\n\nSample queries\n--------------\n\nTo view selected logs, you can write custom queries in the query section.\n\nUse the following query to view resources protected using a backup plan. \n\n logName:\"bdr_protected_resource\" jsonPayload.currentBackupPlanName:\"backupPlans/\u003cvar translate=\"no\"\u003eBACKUPPLAN_NAME\u003c/var\u003e\"\n\nUse the following query to view resources protected in a backup vault. \n\n logName:\"bdr_protected_resource\" jsonPayload.currentBackupVaultName:\"backupVaults/\u003cvar translate=\"no\"\u003eBACKUPVAULT_NAME\u003c/var\u003e\"\n\nWhat's next\n-----------\n\n- To configure log-based alerts for Backup and DR Service, create a log query, using the [filter job logs](#log), and then [Configure log-based alerts](/backup-disaster-recovery/docs/configure-alerts)."]]