Hi, i need to restore a PostgreSQL 11 database in my gcloud in a new instance, but when i proceed to create the instance, in the selector of the database don't show the database.
Someone had the same problem?
Thanks
When attempting to restore a PostgreSQL 11 database to a new Cloud SQL instance, there are a few key considerations to ensure a seamless process. First, it’s essential to confirm that your backup is stored in a location accessible to the new instance. Generally, this means that the backup should reside in the same Google Cloud project and region. If the backup is located in a different project, ensure that the appropriate cross-project permissions are in place to allow access.
Equally important is compatibility. The PostgreSQL version of the backup must precisely match the version selected for the new Cloud SQL instance. In this case, both must be PostgreSQL 11. If you’ve recently created the backup or exported it to Google Cloud Storage, keep in mind there may be a brief delay before it appears in the Cloud SQL console.
To restore your database, first verify the backup. In the Google Cloud Console, navigate to Cloud SQL Instances, select the original instance, and confirm the backup's availability in the Backups tab. Then, proceed to create a new instance. On the Cloud SQL Instances page, select Create Instance, choose PostgreSQL 11, configure settings as needed, and click Create—note that it’s best not to create any databases at this step, as they will be overwritten in the restore process.
After creating the instance, go to its Overview page and select Restore Backup. In the dialog, choose Overwrite an existing instance, select the new instance from the dropdown, and select the relevant backup. This action will overwrite all existing data in the target instance, so be certain this is your intended outcome.
In terms of troubleshooting, if your backup is not immediately visible, refreshing the console may help. Additionally, reviewing Cloud SQL operation logs can provide insights if any errors arise. Google Cloud’s documentation on restoring Cloud SQL instances offers further detail and can be a useful resource.
Hi @SantiagoMsur,
In addition to @ms4446's comprehensive answer, you can refer to the following resources for more information about restoring instances in Cloud SQL for PostgreSQL:
I hope this helps!