Google Cloud SQL

SQL Automated Backups Disabled

Ensures automated backups are enabled for SQL instances.

Risk Level: Low

Description

This plugin guarantees that SQL instances have automated backups enabled. When automated backups are enabled, you may additionally specify a timeframe for them to occur. Backups take place on a daily basis, depending on the timeframe you select. The oldest backup is erased after seven days by default, but the retention parameters can be modified to any value between 1 to 365 days.

About the Service

Google Cloud SQL:

Google Cloud SQL is a relational database for MySQL, PostgreSQL, and SQL Server that is fully managed. It automates database provisioning, storage capacity management, replication, and backups while lowering maintenance costs. It can be set up easily using the built-in migration tools and lets you scale your instances effortlessly. To know more about Cloud SQL, read here

Impact

Without the automated backups feature enabled for your SQL instances, the creation of replicas, clones, and point-in-time recovery will get complicated to handle. Automated backups are critical because they aid in data recovery in the event of accidental data deletion, data corruption, or data failure.

Steps to Reproduce

Using GCP Console-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. From the navigation panel on the left side of the console, go to SQL. You can use this link here to navigate directly if you’re already logged in.
  4. Select the Instance ID of the SQL instance you want to investigate from the list of instances available and click on the BACKUPS tab to check the backup configuration of the selected instance.

  5. Under the Settings section, check the configuration of the Automated backups feature. If it is set to Disabled, then the selected SQL instance does not have automated backups enabled.
  6. Repeat steps 4 and 5 for all the SQL instances you want to investigate in the selected project.
  7. If you have multiple projects, repeat steps 2 to 6 for each project in your GCP Console. 

Steps for Remediation

Determine whether or not you truly require automated backups to be disabled for your SQL instances. If not, make the necessary changes to enable it using the steps below.


Using GCP Console-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. From the navigation panel on the left side of the console, go to SQL. You can use this link here to navigate directly if you’re already logged in.
  4. Select the Instance ID of the SQL instance you want to reconfigure in the list of instances available and click on the BACKUPS tab. (In case you aren’t sure which SQL instance needs to be configured, follow the steps to reproduce listed above to determine which to choose.)

  5. Under the Settings section, click on the Manage automated backups option.  Check the Automate backups checkbox and select your desired time duration from the list of configurations available. Finally, click SAVE to save all the changes.
  6. Repeat steps 4 and 5 for all the SQL instances you want to reconfigure in the selected project.
  7. If you have multiple projects, repeat steps 2 to 6 for each project in your GCP console.