Prevent data loss for your instance by increasing backup retention
Stay organized with collectionsSave and categorize content based on your preferences.
This page describes the AlloyDB increase backup retentionrecommenderwhich helps you detect instances that need longer backup retention periods.
The AlloyDB increase backup retention recommender analyzes instance metadata. If the instance is a production instance with automated backups enabled and has less than 14 retained backups, it is recommended to increase its backup retention.
Recommendations are generated daily.
Pricing
The AlloyDB increase backup retention recommender
is available free of cost to all Google Cloud customers.
For more information, seeRecommender pricing.
Before you begin
Before you can view recommendations and insights, you must do the following:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.alloydb.cluster.ReliabilityRecommender/recommendations?filter=recommenderSubtype=INCREASE_CLUSTER_BACKUP_RETENTION
Replace the following:
PROJECT_ID: your project ID.
LOCATION: a region where your instances are located, such asus-central1.
View insights and detailed recommendations
You can view insights and detailed recommendations about instances
that require increasing their backup retention using the Google Cloud console,Google Cloud CLI, or the Recommender API.
Console
To view insights and detailed recommendations about instances that require increasing their backup retention, click the recommendation link in the list of instances.
gcloud CLI
To view insights and detailed recommendations about instances that require increasing their backup retention, run thegcloud recommender insights listcommand as follows:
gcloud recommender insights list \
--project=PROJECT-ID\
--location=LOCATION\
--insight-type=google.alloydb.cluster.ReliabilityInsight \
--filter=insightSubtype=CLUSTER_INSUFFICIENT_BACKUP_RETENTION
Replace the following:
PROJECT_ID: your project ID.
LOCATION: a region where your instances are located, such asus-central1.
API
To view insights and detailed recommendations about instances that require increasing their backup retention, use theRecommendations API, call theinsights.listmethod as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.alloydb.cluster.ReliabilityInsight/insights?filter=insightSubtype=CLUSTER_INSUFFICIENT_BACKUP_RETENTION
Replace the following:
PROJECT_ID: your project ID.
LOCATION: a region where your instances are located, such asus-central1.
[[["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-09-04 UTC."],[],[],null,["# Prevent data loss for your instance by increasing backup retention\n\nThis page describes the AlloyDB increase backup retention [recommender](/recommender/docs/overview) which helps you detect instances that need longer backup retention periods.\n\nThe AlloyDB increase backup retention recommender analyzes instance metadata. If the instance is a production instance with automated backups enabled and has less than 14 retained backups, it is recommended to increase its backup retention.\n\nRecommendations are generated daily.\n\nPricing\n-------\n\nThe AlloyDB increase backup retention recommender\nis available free of cost to all Google Cloud customers.\nFor more information, see [Recommender pricing](/recommender/pricing).\n\nBefore you begin\n----------------\n\nBefore you can view recommendations and insights, you must do the following:\n\n- Ensure that you [enable the Recommender API](/recommender/docs/enabling).\n\n- To get the permissions to view and work with insights and recommendations,\n ensure that you have the required [Identity and Access Management (IAM) roles](/alloydb/docs/reference/iam-roles-permissions).\n\n \u003cbr /\u003e\n\nSee [Grant access to other users](/alloydb/docs/user-grant-access) for more information.\n\nList reliability recommendations for increasing backup retention\n----------------------------------------------------------------\n\nYou can list the increase backup retention recommendations\nusing the Google Cloud console, `gcloud CLI`, or the Recommender API. \n\n### Console\n\nTo list increase backup retention recommendations using the\nGoogle Cloud console, follow these steps:\n\n1. In the Google Cloud console, go to the **Clusters** page.\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n\n For more information, see\n [Getting started with Recommendation Hub](/recommender/docs/recommendation-hub/identify-configuration-problems).\n2. In the **Data protection** card, click **Show affected resources**.\n\n3. Select instances with the **Short backup retention** recommendation.\n\n### gcloud CLI\n\nTo list increase backup retention recommendations using gcloud CLI, run the\n[`gcloud recommender recommendations list`](/sdk/gcloud/reference/recommender/recommendations/list)\ncommand as follows: \n\n```\ngcloud recommender recommendations list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--recommender=google.alloydb.cluster.ReliabilityRecommender \\\n--filter=recommenderSubtype=INCREASE_CLUSTER_BACKUP_RETENTION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: a region where your instances are located, such as `us-central1`.\n\n### API\n\nTo list increase backup retention recommendations using the\n[Recommendations API](/recommender/docs/using-api), call the\n[`recommendations.list`](/recommender/docs/reference/rest/v1/projects.locations.recommenders.recommendations/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.alloydb.cluster.ReliabilityRecommender/recommendations?filter=recommenderSubtype=INCREASE_CLUSTER_BACKUP_RETENTION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: a region where your instances are located, such as `us-central1`.\n\nView insights and detailed recommendations\n------------------------------------------\n\nYou can view insights and detailed recommendations about instances\nthat require increasing their backup retention using the Google Cloud console,\n`Google Cloud CLI`, or the Recommender API. \n\n### Console\n\nTo view insights and detailed recommendations about instances that require increasing their backup retention, click the recommendation link in the list of instances.\n\n### gcloud CLI\n\nTo view insights and detailed recommendations about instances that require increasing their backup retention, run the\n[`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list)\ncommand as follows: \n\n```\ngcloud recommender insights list \\\n--project=PROJECT-ID \\\n--location=LOCATION \\\n--insight-type=google.alloydb.cluster.ReliabilityInsight \\\n--filter=insightSubtype=CLUSTER_INSUFFICIENT_BACKUP_RETENTION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: a region where your instances are located, such as `us-central1`.\n\n### API\n\nTo view insights and detailed recommendations about instances that require increasing their backup retention, use the\n[Recommendations API](/recommender/docs/using-api), call the\n[`insights.list`](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.alloydb.cluster.ReliabilityInsight/insights?filter=insightSubtype=CLUSTER_INSUFFICIENT_BACKUP_RETENTION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: a region where your instances are located, such as `us-central1`.\n\nApply recommendation\n--------------------\n\nTo increase backup retention, do the following:\n\n1. Click **Short backup retention** in the **Issues** column. A **Short backup retention** window displays providing a recommendation.\n2. Click **View backup policy**.\n3. In the **Data protection** window, depending on the recommended backup policy, do one of the following:\n\n - To increase the number of days covered, click **Edit** in the **Continuous backups and recovery** field.\n - To increase backup frequency, follow instructions in [Enable and configure automated backups](/alloydb/docs/backup/configure#set).\n\n For more information, see [Backup retention and deletion](/alloydb/docs/backup/overview#retention).\n\nWhat's next\n-----------\n\n- [Google Cloud recommenders](/recommender/docs/recommenders)"]]