Cloud SQL external backups (postgres)

591 views
Skip to first unread message

Marcel

unread,
Mar 3, 2019, 3:49:35 AM3/3/19
to Google Cloud SQL discuss
Hi,

We use Google Cloud SQL (Postgres) and are happy with it. However, recently we deleted a compute engine and there was no real warning or password asked in between, Google just deleted it and it was not restorable.

The compute instance was restored easily, but if we delete our SQL instance then we have a really big problem because thousands of users are depending on it. 

So, I have a couple questions:
  • The automatic backups, are they stored externally? In other words, if I accidentily delete the instance, can I still restore those backups?
  • If not, how can I also store backups to an external storage bucket? Ideal would be that the backups are stored in a bucket and backups older than 7 days are deleted for example. 
  • The backups are only created once a day, can we set an higher interval to this?
Thanks in advance!

George (Cloud Platform Support)

unread,
Mar 3, 2019, 1:26:48 PM3/3/19
to Google Cloud SQL discuss
Hello Marcel, 

All data on an instance, including backups, is permanently lost when that instance is deleted. To preserve your data, export it to Cloud Storage before you delete it. You may gather more detail from the "Creating and Managing On-Demand and Automatic Backups" online document

Automated backups are based on a daily 4-hour window of preference. Alternatively, you may consider performing on-demand backups that you can trigger yourself. The "Creating and Managing On-Demand and Automatic Backups" page provides more insight.  

Marcel

unread,
Mar 4, 2019, 2:52:50 AM3/4/19
to Google Cloud SQL discuss
Hi,

Thanks. Is there a way to backup the databases to a storage bucket, instead of to the instance itself? Because now if I accidentally delete the intsance, everything is gone, unrestorable? 

Thanks

Op zondag 3 maart 2019 19:26:48 UTC+1 schreef George (Cloud Platform Support):

diogoa...@google.com

unread,
Apr 2, 2019, 10:00:14 PM4/2/19
to Google Cloud SQL discuss

You can backup to a bucket as per this document.


Marcel

unread,
Apr 15, 2019, 2:11:44 AM4/15/19
to Google Cloud SQL discuss
That only describes manual exports.. I am looking for an automated backup solution! Or am I missing something in the article? 

Op zondag 3 maart 2019 09:49:35 UTC+1 schreef Marcel:

yka...@google.com

unread,
Apr 15, 2019, 1:22:28 PM4/15/19
to Google Cloud SQL discuss
Hello,

Currently, there is no automated way to export the data itself. However, when using the automated backups for the instance, the data is stored in two regions for redundancy as mentioned in this doc.

Marcel

unread,
Apr 16, 2019, 3:50:54 AM4/16/19
to Google Cloud SQL discuss
Ok, but if I delete the database instance, can I restore it using the automated backups? Since deleting an instance seems to be really easy in Google Cloud (no 2FA for example, not even a password popup, no 60 minute soft-delete, etc). 

Op maandag 15 april 2019 19:22:28 UTC+2 schreef yka...@google.com:

yka...@google.com

unread,
Apr 16, 2019, 11:28:21 AM4/16/19
to Google Cloud SQL discuss
When an instance is deleted, the backups are deleted as well, which means you cannot restore it unless you manually did an export before deleting. If it helps, only users with Cloud SQL Admin role can delete an instance.

Otherwise, I have found an open feature request that covers your use case [3]. However there are not ETAs or guarantees for implementation.

Marcel

unread,
Apr 16, 2019, 11:41:56 AM4/16/19
to Google Cloud SQL discuss
Good thing there is a request about it. I just don't understand how Google does not have this available yet. It's crazy, someone can hack into my account and they can delete my database. Backups are deleted as well so boom, my business is gone, non-restorable. I just don't get it.. I think most users don't know about this risk.

There should be a soft-delete first, only after confirm per e-mail or SMS code hard-delete. Or it should be restorable for at least 24 hours. Or it should be backupped to an external location. Even the cheapest hosting solution have better protection against all this than Google does..

Anyway, enough said. I will make sure that I backup it to an external cloud (not sure how yet, hope I can do this with the API by creating an export and later moving the export to Amazon storage bucket). 

Op dinsdag 16 april 2019 17:28:21 UTC+2 schreef yka...@google.com:

Dave Bettin

unread,
Apr 16, 2019, 2:41:35 PM4/16/19
to google-cloud...@googlegroups.com
Agree. This is absolute insanity.  What is the proper way to get this issue resolved?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5fe51c74-c3f1-45d2-a74b-92a58b6c5851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcel

unread,
Apr 17, 2019, 7:35:50 AM4/17/19
to Google Cloud SQL discuss
Yes, it's insane. And there are requests about if from years and years ago. There's a lot of possible solutions but it has to come from the Google platform. For example, either one of the options below would be a great improvement, preferably a combination of these:
  1. Make sure a phone confirmation is required for deletion of database and compute instances. For all I care this can be optional. At least give us the option for 2FA on such sensitive actions. 
  2. Give the user a option to store backups SEPERATE from the instance. So if the instance is deleted, we can still restore the data from a seperate backup.
  3. Make the delete a soft-delete and store it for 24 hours more. After 24 hours hard-delete it. This way a user can always restore a database or compute instance within 24 hours. 
If you go to a simple hosting solution they often ask you to type 'DELETE' or confirm a link in the e-mail, or whatever before they actually delete the server. Google just deletes it without warning, and it's unrestorable..

Op dinsdag 16 april 2019 20:41:35 UTC+2 schreef Dave Bettin:
Agree. This is absolute insanity.  What is the proper way to get this issue resolved?

On Tue, Apr 16, 2019 at 8:41 AM Marcel <vuijk...@gmail.com> wrote:
Good thing there is a request about it. I just don't understand how Google does not have this available yet. It's crazy, someone can hack into my account and they can delete my database. Backups are deleted as well so boom, my business is gone, non-restorable. I just don't get it.. I think most users don't know about this risk.

There should be a soft-delete first, only after confirm per e-mail or SMS code hard-delete. Or it should be restorable for at least 24 hours. Or it should be backupped to an external location. Even the cheapest hosting solution have better protection against all this than Google does..

Anyway, enough said. I will make sure that I backup it to an external cloud (not sure how yet, hope I can do this with the API by creating an export and later moving the export to Amazon storage bucket). 

Op dinsdag 16 april 2019 17:28:21 UTC+2 schreef yka...@google.com:
When an instance is deleted, the backups are deleted as well, which means you cannot restore it unless you manually did an export before deleting. If it helps, only users with Cloud SQL Admin role can delete an instance.

Otherwise, I have found an open feature request that covers your use case [3]. However there are not ETAs or guarantees for implementation.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

yka...@google.com

unread,
Apr 22, 2019, 10:18:11 AM4/22/19
to Google Cloud SQL discuss
Forwarded these suggestions to the Cloud SQL Team.
Reply all
Reply to author
Forward
0 new messages