gcloud backup-dr backup-plans create and update configure log retention
Introduced 2026-07-28 · score 0.96
HOW TO USE IT
When creating or updating a Cloud Backup DR backup plan, set PITR log retention with `--log-retention-days=<days>`; the value must meet the backup vault’s minimum enforced retention duration.
gcloud backup-dr backup-plans create <BACKUP_PLAN> --project=<PROJECT> --location=<LOCATION> --backup-vault=<BACKUP_VAULT> --resource-type=<RESOURCE_TYPE> --log-retention-days=<DAYS>gcloud backup-dr backup-plans update <BACKUP_PLAN> --project=<PROJECT> --location=<LOCATION> --log-retention-days=<DAYS>WHY THIS HELPS
When creating or updating a Cloud Backup DR backup plan, configure Point-in-Time Recovery log retention.
REQUIREMENTS AND LIMITATIONS
- Availability: Available across all release tracks.
- BACKUP_PLAN (required): Backup plan name; it must be unique within the project and location when creating a plan.
- --project: Sets the project; the project can also be set in gcloud configuration or through a fully specified resource name.
- --location (required): Backup plan location.
- --backup-vault (required): Backup Vault ID or fully qualified identifier; required when creating a plan.
- --resource-type (required): Type of resource to which the backup plan applies; required when creating a plan.
- --log-retention-days: Number of days to store logs; must be greater than or equal to the backup vault’s minimum enforced retention duration.
- Prerequisite: Create the plan in a location where Backup and DR is available; update it in a region supported by the Backup and DR Service.
- Prerequisite: Set log retention to at least the backup vault’s minimum enforced retention duration.
FIRST-PARTY EVIDENCE
- https://docs.cloud.google.com/sdk/docs/release-notes#57800_2026-07-28
- https://docs.cloud.google.com/sdk/gcloud/reference/backup-dr/backup-plans/create
- https://docs.cloud.google.com/sdk/gcloud/reference/backup-dr/backup-plans/update
Check the installed version and the source before using it. Entry JSON