{"insertId":"aop2oko38hsami1c","jsonPayload":{"appName":"instance-2","srcid":"111428","jobName":"Job_0110906c","appType":"GCPInstance","eventId":43901,"component":"udp","eventTime":"2023-02-06T20:24:52.450Z","errorMessage":"Failed snapshot Job_0110906c for application instance-2 on host instance-2, Error: 1249: Failed to get VM details , sltname: pd snaps, slpname: ba-1-52973_Profile. "},"resource":{"type":"backupdr.googleapis.com/BackupRecoveryAppliance","labels":{"backup_recovery_appliance_id":"test-backup-recovery-appliances","resource_container":"projects/1234567","management_server_id":"abcd-efgh-1234-5678-6789","location":""}},"timestamp":"2023-02-06T20:24:55.275029393Z","severity":"ERROR","logName":"projects/project1/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events","receiveTimestamp":"2023-02-06T20:24:56.388937247Z"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eEvent logs for backup/recovery appliances provide insights into system events and errors, and can be viewed in Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eTo view event logs, users need the \u003ccode\u003eroles/logging.viewer\u003c/code\u003e permission, granting read-only access to all backup/recovery appliance logs in a specified project.\u003c/p\u003e\n"],["\u003cp\u003eEvent logs can be accessed through the Google Cloud console's Logs Explorer, the Google Cloud CLI, or the Logging API, each requiring specific resource identifiers.\u003c/p\u003e\n"],["\u003cp\u003eEvent log entries include fields like \u003ccode\u003eappName\u003c/code\u003e, \u003ccode\u003esrcid\u003c/code\u003e, \u003ccode\u003ejobName\u003c/code\u003e, \u003ccode\u003eappType\u003c/code\u003e, \u003ccode\u003eeventId\u003c/code\u003e, \u003ccode\u003ecomponent\u003c/code\u003e, \u003ccode\u003eeventTime\u003c/code\u003e, and \u003ccode\u003eerrorMessage\u003c/code\u003e, which can be used to create custom log queries.\u003c/p\u003e\n"],["\u003cp\u003eEvent logs will not be generated for jobs that have been completed successfully, only unsuccessful jobs.\u003c/p\u003e\n"]]],[],null,["# Backup and DR event logs\n\nThis page explains how to view the event logs created on backup/recovery appliance\nin **Cloud Logging**. Event logs provide insight on your\nbackup/recovery appliance, such as system events or errors.\n\nPermissions and roles\n---------------------\n\n[IAM](/iam/docs) permissions and roles determine if you can access event logs\ndata of Backup and DR Service.\n\nYou need the permission `roles/logging.viewer` to view the event logs. The\n**Logs Viewer** role gives you read-only access to view\nevent logs of all backup/recovery appliances in the specified\nproject. For more information about the IAM permissions and roles that apply\nto event logs data, see [Access control with IAM](/logging/docs/access-control).\n\nView event logs\n---------------\n\nYou can view Backup and DR event logs in **Cloud Logging** by using the\nGoogle Cloud console and the Google Cloud CLI. \n\n### Console\n\nIn the Google Cloud console, you can use the **Logs Explorer** to retrieve the\nBackup and DR event log entries for your backup/recovery appliances:\n\n1. In the Google Cloud console, go to the **Logging \\\u003e Logs Explorer**.\n2. Select an existing Cloud project.\n3. In the **Query builder** pane, follow these steps:\n\n 1. From the **Resource** drop-down, select the *Backup Recovery Appliance*.\n 2. From the **Select Log name** drop-down, select the *backup_recovery_appliance_events* to view event logs of backup/recovery appliances.\n\n| **Note:** Support for Cloud Logging was enabled on March 6, 2023. Hence, you can only view the event logs that have been generated post March 6,2023 in the Google Cloud console.\n\n### gcloud\n\nThe Google Cloud CLI provides a command-line interface to the **Logging API**.\nSupply a valid resource identifier in each of the log names. To read your\nevent log entries of backup/recovery appliances in a project, run the\nfollowing command: \n\n ```gcloud\n gcloud logging read \"logName : projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backup_recovery_appliance_events\"\\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n ```\n\n### API\n\nTo view your audit log entries of backup/recovery appliances in a project,\ndo the following:\n\n1. Go to the **Try this API** section in the documentation for the [entries.list](/logging/docs/reference/v2/rest/v2/entries/list) method.\n2. Put the following into the **Request body** part of the **Try this API**\n form. Clicking this [prepopulated form](/logging/docs/reference/v2/rest/v2/entries/list)\n automatically fills the request body, but you need to supply a valid\n PROJECT_ID in each of the log name field.\n\n ```API\n {\n \"resourceNames\": [\n \"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\"\n ],\n \"pageSize\": 5,\n \"filter\": \"logName : projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr_audit_log\"\n }\n ```\n\n3. Click **Execute**.\n\nEvent log format\n----------------\n\nBackup and DR event log entries include the following fields:\n\n- **appName**: This field displays the name of the application associated with the event.\n- **srcid**: This field displays a unique ID of the event occurring in the backup/recovery appliance.\n- **jobName**: This field displays the name of the job associated with the event.\n- **appType**: This field displays the type of the application associated with the event.\n- **eventId**: This field displays a unique ID associated with the error.\n- **component**: This field displays the source of the event.\n- **eventTime**: This field displays the time when the event was reported.\n- **errorMessage**: This field describes the detailed error associated with the event.\n\n| **Note:** You can write custom queries to filter logs using any of these log entry fields.\n\nThe following sample is an example log entry logged on a backup/recovery appliance\n`ba-1-52973` for a failed snapshot job. \n\n {\n \"insertId\": \"aop2oko38hsami1c\",\n \"jsonPayload\": {\n \"appName\": \"instance-2\",\n \"srcid\": \"111428\",\n \"jobName\": \"Job_0110906c\",\n \"appType\": \"GCPInstance\",\n \"eventId\": 43901,\n \"component\": \"udp\",\n \"eventTime\": \"2023-02-06T20:24:52.450Z\",\n \"errorMessage\": \"Failed snapshot Job_0110906c for application instance-2 on host instance-2, Error: 1249: Failed to get VM details , sltname: pd snaps, slpname: ba-1-52973_Profile. \"\n },\n \"resource\": {\n \"type\": \"backupdr.googleapis.com/BackupRecoveryAppliance\",\n \"labels\": {\n \"backup_recovery_appliance_id\": \"test-backup-recovery-appliances\",\n \"resource_container\": \"projects/1234567\",\n \"management_server_id\": \"abcd-efgh-1234-5678-6789\",\n \"location\": \"\"\n }\n },\n \"timestamp\": \"2023-02-06T20:24:55.275029393Z\",\n \"severity\": \"ERROR\",\n \"logName\": \"projects/project1/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\",\n \"receiveTimestamp\": \"2023-02-06T20:24:56.388937247Z\"\n }\n\n| **Note:** Event logs are not generated for successfully completed backup jobs. To view the status and history of successful jobs, go to the **Management console** \\\u003e [**Jobs**](/backup-disaster-recovery/docs/monitor-reports/monitor-jobs).\n\nSample queries\n--------------\n\nYou can write custom event queries in the query section to view the event logs\nthat you want.\n\nUse the following query to view all the event logs associated with\nbackup/recovery appliances for a given \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\"\n\nIf you are looking for event logs for a specific backup/recovery appliance,\nadd the following backup/recovery appliance name: \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\"\n resource.labels.backup_recovery_appliance_id= \"\u003cvar translate=\"no\"\u003ebackup/recovery appliance name\u003c/var\u003e\"\n\nIf you are looking for event logs for a specific event ID, then use the\nfollowing log query. Make sure you use an uppercase *AND*.\n**Note:** You can refer to the [*Event IDs*](/backup-disaster-recovery/docs/event-codes), for the list of important Backup and DR event IDs. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\"\n AND jsonPayload.eventId = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003c/var\u003e\n\nIf you are looking for event logs for multiple specific event IDs, then use the\nfollowing log query. Make sure you use an uppercase *AND* and *OR*. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\"\n AND jsonPayload.eventId = (\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e1\u003c/span\u003e\u003c/var\u003e OR \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e2\u003c/span\u003e\u003c/var\u003e OR \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e3\u003c/span\u003e\u003c/var\u003e)\n\nIf you are looking for event logs and you want to exclude specific event IDs,\nthen use the following log query. Make sure you use uppercase *AND NOT* and *OR*. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\"\n AND NOT jsonPayload.eventId = (\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e1\u003c/span\u003e\u003c/var\u003e OR \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e2\u003c/span\u003e\u003c/var\u003e OR \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eevent\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eID\u003c/span\u003e\u003cspan class=\"devsite-syntax-w\"\u003e \u003c/span\u003e\u003cspan class=\"devsite-syntax-mi\"\u003e3\u003c/span\u003e\u003c/var\u003e)\n\nIf you are looking for event logs for a specific application, then use the\nfollowing log query. Make sure you use uppercase *AND*. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fbackup_recovery_appliance_events\" AND jsonPayload.app_name = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eappname\u003c/span\u003e\u003c/var\u003e\n\nWhat's next\n-----------\n\n- To configure log-based alerts for Backup and DR Service, create a log query,\n using the [filter event logs](#log), and then [Configure log-based alerts](/backup-disaster-recovery/docs/configure-alerts).\n\n- To create log-based metrics for Backup and DR Service, see [Log-based metrics overview](/logging/docs/logs-based-metrics)."]]