Enable backup plans

This page describes the AlloyDB enable backup plans recommender which helps you detect instances where both continuous backup and recovery and automated backup plans are disabled.

The enable backup plans recommender analyzes instance metadata and recommends to enable at least one of these backup methods to protect your data and facilitate recovery.

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: recommender.alloydbViewer or alloydb.viewer.
    Apply recommendations One of these roles: recommender.alloydbAdmin or 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, Google Cloud CLI, or the Recommender API.

Console

To list enable automated backups recommendations using the Google Cloud console, follow these steps:

  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

    For more information, see Getting started with Recommendation Hub.

  2. In the Data protection card, click No backup policy enabled.

  3. Under the Resources table, select instances with 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 as us-central1.

API

To list enable automated backups recommendations using the Recommendations 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 as us-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, Google Cloud 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 as us-central1.

API

To view insights and detailed recommendations about instances that require enabling automated backups, use the Recommendations 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 as us-central1.

Apply recommendation

To implement this recommendation, do the following:

  1. Click Enable automated backups in the Issues column. An Enable automated backups window displays providing a recommendation.
  2. Click View backup policy.
  3. 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.
  4. Set up a backup plan of your choice.

    For more information, see Automated backup configuration attributes.

What's next