Search code examples
google-cloud-platformgoogle-cloud-sqldatabase-backups

keep backup for deleted CloudSQL instance


I have a manual backup I'd like to keep from a recently deleted CloudSQL instance

Is there a way to keep that backup indefinitely?


Solution

  • On-demand backups only will exist while the instance exists. This in mentioned in the docs:

    On-demand backups are not automatically deleted the way automated backups are. They persist until you delete them or until their instance is deleted.

    The best approach is to make an export to a GCS bucket. This is as well mentioned in the same doc:

    Backups are managed by Cloud SQL according to retention policies, and are stored separately from the Cloud SQL instance. Cloud SQL backups differ from an export uploaded to Cloud Storage, where you manage the lifecycle.