To protect against data loss and support point-in-time or backup recovery, you can use the AlloyDB for PostgreSQL enable backup plans recommender to identify instances where both continuous backup and recovery and automated backup plans are disabled.
The enable backup plans recommender analyzes instance metadata and, if neither backup method is enabled, recommends that you enable at least one of these backup methods.
Recommendations are generated daily.
Pricing
The AlloyDB enable backup plans recommender is available free of cost to all Google Cloud customers. For more information, see Recommender pricing.
Before you begin
Before you can view recommendations and insights, you must do the following:
- Ensure that you enable the Recommender API.
- To get the permissions to view and work with insights and recommendations,
ensure that you have the required Identity and Access Management (IAM) roles.
Tasks Roles View recommendations One of these roles: roles/recommender.alloydbViewerorroles/alloydb.viewer.Apply recommendations One of these roles: roles/recommender.alloydbAdminorroles/alloydb.admin.
See Grant access to other users for more information.
List reliability recommendations for enabling automated backups
You can list the enable automated backups recommendations by using the Google Cloud console, gcloud CLI, or the Recommender API.
Console
To list enable automated backups recommendations using the Google Cloud console, follow these steps:
In the Google Cloud console, go to the Clusters page.
For more information, see Getting started with Active Assist.
In the Resources list table, find the cluster and click View issues in the Issues column.
In the Event data panel, select the No backup policy enabled recommendation.
gcloud CLI
To list enable automated backups recommendations using gcloud CLI, run the
gcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \ --project=PROJECT_ID \ --location=LOCATION \ --recommender=google.alloydb.cluster.ReliabilityRecommender \ --filter=recommenderSubtype=ENABLE_CLUSTER_BACKUP_POLICY
Replace the following:
PROJECT_ID: your project ID.LOCATION: the region where your instances are located, such asus-central1.
API
To list enable automated backups recommendations using the
Recommender API, call the
recommendations.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.alloydb.cluster.ReliabilityRecommender/recommendations?filter=recommenderSubtype=ENABLE_CLUSTER_BACKUP_POLICY
Replace the following:
PROJECT_ID: your project ID.LOCATION: the 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 enabling automated backups using the Google Cloud console, gcloud CLI, or the Recommender API.
Console
To view insights and detailed recommendations about instances that require enabling automated backups, click the recommendation link in the list of instances on the Clusters page.
gcloud CLI
To view insights and detailed recommendations about instances that require enabling automated backups, run the
gcloud recommender insights list
command as follows:
gcloud recommender insights list \ --project=PROJECT_ID \ --location=LOCATION \ --insight-type=google.alloydb.cluster.ReliabilityInsight \ --filter=insightSubtype=CLUSTER_BACKUP_POLICY_NOT_ENABLED
Replace the following:
PROJECT_ID: your project ID.LOCATION: the region where your instances are located, such asus-central1.
API
To view insights and detailed recommendations about instances that require enabling automated backups, use the
Recommender API, call the
insights.list
method as follows:
GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.alloydb.cluster.ReliabilityInsight/insights?filter=insightSubtype=CLUSTER_BACKUP_POLICY_NOT_ENABLED
Replace the following:
PROJECT_ID: your project ID.LOCATION: the region where your instances are located, such asus-central1.
Apply recommendation
To implement this recommendation, do the following:
- In the Resources list table, click View issues in the Issues column for the cluster.
- In the Aggregated issues panel, select the No backup policy enabled recommendation card.
- Click View backup policy.
In the Data protection window, depending on the recommended backup policy, do one of the following:
- To enable continuous backups and recovery, click Edit in the Continuous backups & recovery field.
- To enable automated backups, click Edit in the Automated backups field.
Set up a backup plan of your choice.
For more information, see Automated backup configuration attributes.