Manage enhanced backups Stay organized with collections Save and categorize content based on your preferences.
Preview —Enhanced backups
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. You can process personal data for this feature as outlined in theCloud Data Processing Addendum, subject to the obligations and restrictions described in the agreement under which you access Google Cloud. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
Enhanced backups allow you to use Backup and DR Service with yourCloud SQL instances to manage your backups. You canenable enhanced backups for any instance by associating it with aBackup and DR backup plan.You can alsomanage enhanced backups for your instance bydoing the following:
- Change your instance's associated backup plan
- Perform an on-demand backup
- List all backups in the backup vault for your instance
For more information about how enhanced backups work and their integration withBackup and DR,seeEnhanced backups.For more information on how backups work in Cloud SQL, seeCloud SQL overview.
Before you begin
Before you can manage enhanced backups for your Cloud SQL instances,you must do the following:
- Enable the Backup and DR API
- Confirm you have therequired permissions
Enable the Backup and DR API
To use enhanced backups with your Cloud SQL instances, you must firstenable the Backup and DR API:
Required permissions
The following permissions are required to configure enhanced backups for yourCloud SQL instances:
backupdr.backupPlans.listbackupdr.backupPlanAssociations.createForCloudSqlInstancebackupdr.backupPlanAssociations.fetchForCloudSqlInstancebackupdr.backupPlanAssociations.listbackupdr.backupPlanAssociations.getForCloudSqlInstancebackupdr.backupPlanAssociations.triggerBackupForCloudSqlInstancebackupdr.backupPlanAssociations.deleteForCloudSqlInstancebackupdr.backupPlans.useForCloudSqlInstancebackupdr.bvdataSources.getbackupdr.bvdataSources.list
For more information about these permissions, seeBackup and DR roles and permissions.
Enable enhanced backups
To enable enhanced backups for your instance, do the following:
- Identify the backup vault and backup plan you want to use.
- Associate your Cloud SQL instance to the backup plan.
For more information about enhanced backups, seeAbout Cloud SQL backups.
Identify the backup plan you want to use
Thebackup planis used by enhanced backups to define your instance's backupschedule and retention settings. To associate your Cloud SQLinstance with a backup plan, you need to first identify thebackup plan youwant to use. For more information, seeCreate and manage a backup plan.
Important: The backup plan you want to use must be in the same region as yourCloud SQL instance.Once you've identified the backup plan you want to associate, use the backupplan name to associate it with your Cloud SQL instance.
Associate a backup plan to a Cloud SQL instance
Warning: When you attach a backup plan to a Cloud SQL instance, the existingbackup and restore settings are overwritten by the backup plan.To associate a backup plan with a Cloud SQL instance, you'llneed the name for the backup plan you want to use. For more information on howto find the backup plan name,seeCreate and manage a backup plan.
Console
To associate a backup plan with your Cloud SQL instance, do thefollowing:
In the Google Cloud console, go to theCloud SQL Instances page.
Find the instance you want to associate the backup plan with. To opentheOverview page of the instance, click the instance name.
ClickEdit.
In theData Protection section, underBackup tier, selectEnhanced backup tier.
In theBackup plan section, clickSelect.
In theSelect a backup plan window, do the following:
UnderProject, clickBrowse, then search for and selectthe Backup and DR project that contains the backup plan.
Once you select the project, you'll see a list of all availablebackup plans. Find the backup plan you want to use, then clickSelect.
ClickSave.
Your instance is enabled for enhanced backups and using the associatedbackup plan's backup and retention settings.
Caution: This might cause your instance to restart.
gcloud
To associate a backup plan with your Cloud SQL instance, run thefollowing command:
gcloudbackup-drbackup-plan-associationscreateBACKUP_PLAN_ASSOCIATION_NAME--project=PROJECT_ID--resource=INSTANCE_ID--backup-plan=BACKUP_PLAN_NAME--resource-type=sqladmin.googleapis.com/Instance--location=REGION_IDReplace the following:
- BACKUP_PLAN_ASSOCIATION_NAME: the name of the backupplan association.
- PROJECT_ID: your instance's project ID.
- INSTANCE_ID: the ID of the instance you want to associatethe backup plan to.
- BACKUP_PLAN_NAME: the name of the backup plan you want touse. For more information, seeidentify the backup plan you want to use.
- REGION_ID: the instance's region.
REST v1
To create a backup plan association, use thebackupPlanAssociationsmethod in theBackup and DR API.
Before using any of the request data, make the following replacements:
- backup-plan-association-id: the backup plan association ID
- resource-name: the full name of the Cloud SQL instance, in
projects/project-id/locations/location/instances/instance-nameformat - backup-plan-name: the name of the backup plan, in
projects/project-id/backupPlans/backup-plan-nameformat
HTTP method and URL:
POST https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations
Request JSON body:
{ "name": "backup-plan-association-id", "resourceType": "sql.googleapis.com/Instance", "resource": "resource-name", "backupPlan": "backup-plan-name"}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "kind": "operation", "state": "CREATING", "user": "user@example.com", "updateTime": "2020-01-21T22:43:37.981Z", "operationType": "backupPlanAssociations.create", "name": "operation-id", "dataSource": "projects/project-id/locations/location/backupVaults/backup-vault-name/dataSources/data-source-name"}Manage enhanced backups
After you instance is enabled for enhanced backups and a backup plan isassociated with the instance, you canperform an on-demand backup,view all the backups in the backup vault,orchange the associated backup plan.
To manage a backup plan, seeCreate and manage a backup plan.To manage a backup vault, seeCreate and manage a backup vault.
Change your instance's associated backup plan
You can change the associated backup plan with your Cloud SQL instance.To change the backup plan applied to your Cloud SQL instance, the newplan must be in the same backup vault as your current backup plan, and be inthe same region as your Cloud SQL instance.
To change the associated backup plan, you must:
Remove the associated backup plan
To change to a new backup plan, you must first remove the existing backupplan association from your Cloud SQL instance. To remove the backupplan, do the following:
Console
In the Google Cloud console, go to theCloud SQL Instances page.
Find the instance you want to change the backup option for. To open theOverview page of an instance, click the instance name.
ClickEdit.
In theData Protection section, underBackup tier, select theStandard backup tier. Update the standard backups settings for yourinstance as necessary.
ClickSave.
The instance's associated backup plan is deleted and your instance is nowmanaged under the standard backups option. You can nowassociate the new backup plan to yourinstance.
gcloud
To change to a new backup plan, you must first remove the existing backupplan association from your Cloud SQL instance. To remove the backupplan, do the following:
gcloud backup-dr backup-plan-associations deleteBACKUP_PLAN_ASSOCIATION_NAME--location=BACKUP_VAULT_LOCATIONReplace the following:
- BACKUP_PLAN_ASSOCIATION_NAME: the name of the backupplan association you want to delete.
- BACKUP_VAULT_LOCATION: the location of the backup vault.
The instance's associated backup plan is deleted and your instance is nowmanaged under the standard backups option. You can nowassociate the new backup plan to yourinstance.
REST v1
To change a backup plan association, you need to first remove the existingbackup plan association. Use thebackupPlanAssociationsmethod in theBackup and DR API.
Before using any of the request data, make the following replacements:
- backup-plan-association-id: the backup plan association ID, in
projects/project-id/locations/location/backupPlanAssociations/backup-plan-association-idformat
HTTP method and URL:
POST https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete
Request JSON body:
{ "name": "backup-plan-association-id",}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "kind": "operation", "done": "true", "user": "user@example.com", "updateTime": "2020-01-21T22:43:37.981Z", "operationType": "backupPlanAssociations.delete", "name": "operation-id"}Associate the new backup plan with your instance
After you remove the existing backup plan, you can associate a new backup planto your Cloud SQL instance:
Console
To associate the new backup plan with your instance, do the following:
In the Google Cloud console, go to theCloud SQL Instances page.
Find the instance you want to change the backup plan for. To opentheOverview page of the instance, click the instance name.
ClickEdit.
In theData Protection section, underBackup tier,selectEnhanced backup tier.
In theSelect a backup plan window, do one of the following:
UnderProject, clickBrowse, then search for and select theBackup and DR project that contains the backup plan youwant to use.
Once you select the project, you'll see a list of all available backupplans. Find the backup plan you want to use, then clickSelect.
ClickSave.
Your instance is enabled for enhanced backups and is using the newbackup plan that you selected.
Note: This will cause your instance to restart.
gcloud
To associate the new backup plan with your instance, do the following:
gcloudbackup-drbackup-plan-associationscreateBACKUP_PLAN_ASSOCIATION_NAME--project=PROJECT_ID--resource=INSTANCE_ID--backup-plan=BACKUP_PLAN_NAME--resource-type=sqladmin.googleapis.com/Instance--location=REGION_IDReplace the following:
- BACKUP_PLAN_ASSOCIATION_NAME: the name of the backupplan association.
- PROJECT_ID: the instance's project ID.
- INSTANCE_ID: the instance's ID.
- BACKUP_PLAN_NAME: the name of the backup plan. For moreinformation, seeidentify the backup plan you want to use.
- REGION_ID: the instance's region.
REST v1
After you delete the existing backup plan association, associate the newbackup plan using thebackupPlanAssociationsmethod in theBackup and DR API.
Before using any of the request data, make the following replacements:
- backup-plan-association-id: the backup plan association ID
- resource-name: the full name of the Cloud SQL instance, in
projects/project-id/locations/location/instances/instance-nameformat - backup-plan-name: the name of the backup plan, in
projects/project-id/backupPlans/backup-plan-nameformat
HTTP method and URL:
POST https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations
Request JSON body:
{ "name": "backup-plan-association-id", "resourceType": "sql.googleapis.com/Instance", "resource": "resource-name", "backupPlan": "backup-plan-name"}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "kind": "operation", "state": "CREATING", "user": "user@example.com", "updateTime": "2020-01-21T22:43:37.981Z", "operationType": "backupPlanAssociations.create", "name": "operation-id", "dataSource": "projects/project-id/locations/location/backupVaults/backup-vault-name/dataSources/data-source-name"}Perform an on-demand backup
You can perform an on-demand backup for a Cloud SQL instance with andassociated backup plan using Google Cloud console,gcloud CLI, or theCloud SQL API.
Console
To perform an on-demand backup for an instance with enhanced backups enabled,do the following:
In the Google Cloud console, go to theCloud SQL Backups page.
ClickCreate backup.
In theCreate an on-demand backup window, underChoose a backup rule, select the type of on-demand backup you want totake. The backup rule defines the retention period of the on-demandbackup.
ClickCreate.
Your on-demand backup is created.
gcloud
To perform an on-demand backup for an instance with enhanced backups enabled,run the following command:
gcloud backup-dr backup-plan-associations trigger-backupBACKUP_PLAN_ASSOCIATION_NAME--backup-rule-id=BACKUP_RULE_ID--project=PROJECT_ID--location=BACKUP_VAULT_LOCATION[--no-async]Replace the following:
- BACKUP_PLAN_ASSOCIATION_NAME: the name of the backupplan association of your Cloud SQL instance. To find a listof all backup plans associated with a Cloud SQL instance,seeList all backup plan associations.
- BACKUP_RULE_ID: the backup rule name for the type ofon-demand backup you want to take (e.g.
rule-daily). - PROJECT_ID: the instance's project ID.
- BACKUP_VAULT_LOCATION: the location of the backup vaultassociated with your backup plan.
REST v1
To trigger an on-demand backup for your Cloud SQL instance, use thebackupPlanAssociationsmethod in theBackup and DR API.
Before using any of the request data, make the following replacements:
- backup-rule-id: the backup rule ID for which a backup needs to be triggered
HTTP method and URL:
GET https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/backup-plan-association-id:triggerBackup
Request JSON body:
{ "ruleId": "backup-rule-id"}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/backup-plan-association-id:triggerBackup"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/backup-plan-association-id:triggerBackup" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "kind": "operation", "done": "true", "user": "user@example.com", "updateTime": "2020-01-21T22:43:37.981Z", "operationType": "backupPlanAssociations:triggerBackup", "name": "operation-id"}List all the backups in a backup vault for your instance
You can list all backups for in the backup vault for yourCloud SQL instance using Google Cloud console,gcloud CLI, or theCloud SQL API.
Console
In the Google Cloud console, go to theCloud SQL Backups page.
In theBackup tier drop-down, selectEnhanced tier, thenselect theBackup vault that contains the backup you want to use.
All backups available in the backup vault for your selected instanceare displayed.
gcloud
To list all available backups for your Cloud SQL instance in thebackup vault, you need to first find thedata-source for yourCloud SQL instance, then run thegcloud backup-dr backups listcommand.
To find your instance'sdata-source, run the following command:
gcloudbackup-drdata-source-referencesfetch-for-resource-typesqladmin.googleapis.com/Instance--location=REGION_ID|grepINSTANCE_NAMEReplace the following:
- REGION_ID: the region ID for your Cloud SQLinstance.
- INSTANCE_NAME: the name of your Cloud SQLinstance.
To list all the backups in a backup vault for your instance,run the following command:
gcloud backup-dr backups list--data-source=DATA_SOURCE--location=REGION_ID--backup-vault=BACKUP_VAULT_NAMEReplace the following:
- DATA_SOURCE: the
data-sourcefor yourCloud SQL instance. - REGION_ID: the region ID for the backupvault.
- BACKUP_VAULT_NAME: the name of the backup vaultassociated with your backup plan.
REST v1
To list all available backups for your Cloud SQL instance in thebackup vault, you need to first find the data source for yourCloud SQL instance, then get all the backups using the data sourcename.
Find the instance's data source
To find your instance's data source, use thedataSource.Referencesmethod in theBackup and DR API.
HTTP method and URL:
GET https://backupdr.googleapis.com/v1/projects/project-id/locations/location/dataSourceReferences:fetchForResourceType?filter=dataSourceGcpResourceInfo.gcp_resourcename="projects/project-id/instances/instance-id
Request JSON body:
{ "resourceType": "sqladmin.googleapis.com/Instance"}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/dataSourceReferences:fetchForResourceType?filter=dataSourceGcpResourceInfo.gcp_resourcename="projects/project-id/instances/instance-id"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/dataSourceReferences:fetchForResourceType?filter=dataSourceGcpResourceInfo.gcp_resourcename="projects/project-id/instances/instance-id" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "name": "projects/project-id/locations/location/dataSourceReferences/dataSourceId" "dataSourceBackupConfigState": "ACTIVE", "dataSourceBackupCount": "1", "dataSourceBackupConfigInfo": { "lastBackupState: "SUCCEEDED", "lastSuccessfulBackupConsistencyTime": "2024-09-19T18:00:00Z" }, "dataSourceGcpResourceInfo": { "gcpResourceName": "projects/project-id/instances/instance-id", "type": "sqladmin.googleapis.com/Instance", "location": "location" "cloudSqlInstanceProperties": { "name": "projects/project-id/instances/instance-id" } }}List the instance's backups
To list your the backups for your instance using the data source ID, use thebackupVaults.dataSources.backupsmethod in theBackup and DR API.
HTTP method and URL:
GET https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupVaults/backup-vault-id/dataSources/data-source-id/backups
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupVaults/backup-vault-id/dataSources/data-source-id/backups"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupVaults/backup-vault-id/dataSources/data-source-id/backups" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "backups": [ { "name": "backup-name", "state": "ACTIVE", "backupType": "ON_DEMAND", "createTime": "", "expireTime": "", "CloudSqlInstanceBackupProperties": { "databaseInstalledVersion": "database-installed-version", "finalBackup": "TRUE", "sourceInstance": "instance-name", "instanceTier": "db-custom-1-3840" } }, { ... } ]}Disable enhanced backups
You can disable enhanced backups by switching your Cloud SQL instanceback to the standard backups option. This deletes the association between thebackup plan and your instance.
Change your instance to standard backups
Warning: Changing your instance to standard backups causes your instanceto restart.Console
To disable enhanced backups and switch your instance back to the standardbackups option, do the following:
In the Google Cloud console, go to theCloud SQL Instances page.
Find the instance you want to change the backup option for. To opentheOverview page of the instance, click the instance name.
ClickEdit.
In theData Protection section, underBackup tier,select theStandard backup tier. Update the Standard backupssettings for your instance as necessary.
ClickSave.
Your instance's associated backup plan is deleted and your instanceis now managed under the Standard backups option, managed by Cloud SQL.
gcloud
To disable enhanced backups and switch your instance back to the standardbackups option, run the following command:
gcloud backup-dr backup-plan-associations deleteBACKUP_PLAN_ASSOCIATION_NAME--location=BACKUP_VAULT_LOCATIONReplace the following:
- BACKUP_PLAN_ASSOCIATION_NAME: the name of the backupplan association you want to delete.
- BACKUP_VAULT_LOCATION: the location of the backup vault.
REST v1
To disable enhanced backups, you need to remove the backup plan associationusing thebackupPlanAssociationsmethod in theBackup and DR API.
Before using any of the request data, make the following replacements:
- backup-plan-association-id: the backup plan association ID, in
projects/project-id/locations/location/backupPlanAssociations/backup-plan-association-idformat
HTTP method and URL:
POST https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete
Request JSON body:
{ "name": "backup-plan-association-id",}To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete"
PowerShell (Windows)
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://backupdr.googleapis.com/v1/projects/project-id/locations/location/backupPlanAssociations/delete" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Response
{ "kind": "operation", "done": "true", "user": "user@example.com", "updateTime": "2020-01-21T22:43:37.981Z", "operationType": "backupPlanAssociations.delete", "name": "operation-id"}What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.