Cloud SQL Dump time

128 views
Skip to first unread message

Rajat Gupta

unread,
Jul 22, 2020, 12:19:20 PM7/22/20
to Google Cloud SQL discuss
I am experiencing an weird behaviour while taking a backup, its taking 5-7 minutes to get a schema dump of size 125kB from a GCP Cloud SQL DB to local machine.
Is there something that can be tuned here?

Dump process:




File Size:


Network:


Best,
Rajat

Confidentiality Notice: 
This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED.  If you have received this transmission in error, please immediately notify the sender. Please destroy the original transmission and its attachments without reading or saving in any manner.

Alexis (Google Cloud Support)

unread,
Jul 22, 2020, 7:09:55 PM7/22/20
to Google Cloud SQL discuss
Hello Rajat,

There could be a lot of possibilities but we will try to assist the best we can.

It appears that you tried to copy/paste information below but it's not visible to me. Without posting personal information, would you please indicate which command you used and also if it does it on another computer.

Questions:
- Which Cloud SDK / mysql command did you use?
- Is it doing it on more than one computer?
- Did it use to work before?
- Have you tried another instance?
- How big roughly is this instance?

I don't know how much data you have, but if it's because it's too small, then we can try to replicate the problem as soon as you provide us with more info.

Thank you

Rajat Gupta

unread,
Jul 23, 2020, 1:57:52 AM7/23/20
to Google Cloud SQL discuss
Hi Alexis,

Answer to your questions:
- Which Cloud SDK / mysql command did you use?
Using postgres pg_dump utility
- Is it doing it on more than one computer?
Yes, I tried it on GCP VM, its much smooth there arround 5-7 seconds. And 2 minutes for 130MB data dump.
- Did it use to work before?
No, earlier I had same issue, so used the cloud sql backup utility. But here I needed just schema so had to use this.
- Have you tried another instance?
Yes, Same issue
- How big roughly is this instance?
This instance is occuping 2GB total space, with 7-8 databases


-------------Original message------------

I am experiencing an weird behaviour while taking a backup, its taking 5-7 minutes to get a schema dump of size 125kB from a GCP Cloud SQL DB to local machine.
Is there something that can be tuned here?

Dump process:




File Size:


Network:


Best,
Rajat



Best,
Rajat



From: 'Alexis (Google Cloud Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com>
Sent: Thursday, July 23, 2020 04:39
To: Google Cloud SQL discuss <google-cloud...@googlegroups.com>
Subject: [google-cloud-sql-discuss] Re: Cloud SQL Dump time
 
--
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/b6a61e2f-de39-45d1-a277-72d42b9deb1bo%40googlegroups.com.

Elliott (Google Cloud Platform Support)

unread,
Jul 27, 2020, 6:42:30 PM7/27/20
to Google Cloud SQL discuss
Hello,

To make sure our steps match, you may follow the information here:

1) Find a Linux workstation (gLinux desktop is fine; remote SSH is fine as well if you want the backup somewhere else)

2) If you don't already have the Postgres CLI tools, you can install them: sudo apt-get install postgresql-client

3) Prepare the CloudSQL instance to accept a connection from the machine you are using. You can follow this guide to find the easiest way to do this if you are not sure how to.

4) You can then prepare to do the dump. Enter a directory with lots of space (relative to the size of the database) and then prepare by running

pg_dump -h <IP> -U postgres -F t postgres > export.sql

5) You will be prompted for your Postgres password; enter it and then the export will begin to a file called export.sql

I have included these steps to give you an idea of the process and to try it yourself and see if they work.

I will wait for your response.

Rajat Gupta

unread,
Jul 28, 2020, 3:10:23 PM7/28/20
to Google Cloud SQL discuss
Hi,

1) using a lunix machine

2) had a postgresql client
postgresql-client.png

3) Done

4) this is a 160MB file for a schema backup in t format 
Screenshot from 2020-07-28 23-54-52.png

this is a 480kB file for a schema backup in t format 
Screenshot from 2020-07-29 00-12-13.png

this is a 200kB file for a schema backup in sql format 
Screenshot from 2020-07-29 00-28-27.png

this is a 145Kb file for a schema backup in sql format
Screenshot from 2020-07-28 11-26-52.png

Also the Network stats:
Screenshot from 2020-07-29 00-20-03.png

Best,
Rajat

Alexis (Google Cloud Support)

unread,
Jul 29, 2020, 1:33:17 PM7/29/20
to Google Cloud SQL discuss
Hi Rajat,

Thank you for providing us all the information. It definitely looks like you are getting consistent results of the same problem.

I tried to reproduce the issue and didn't have any problems, but it's hard to tell since I don't have 2GB of data to put into the database to test and your environment could be very different. I also searched for other related known issues and didn't find any. I'm suspecting this could be an isolated incident as it would have been reported by now. The only thing we haven't eliminated yet from your setup is the connection.

Would you please try from another connection? If that doesn't work on another connection, you will probably have to open an issue privately in Google's Issue Tracker[1] or open a support ticket[2] as it's an isolated case. But before you do that, please test another connection. This would avoid you waiting longer for our engineers to try and find an issue which maybe doesn't exist on our side. It would save you time.

Please eliminate the connection possibility and let us know. Thanks in advance.

Reply all
Reply to author
Forward
0 new messages