Understanding the behaviour of gcloud sql export

229 views
Skip to first unread message

Matteo Di Sabatino

unread,
Oct 18, 2018, 9:08:45 AM10/18/18
to Google Cloud SQL discuss
Hello all,
I've got a Google Cloud SQL instance of second generation; for a purpose of mine, I decided to create a sort of replica machine by exporting data from it and importing to another instance.
Before begin I controlled the used disk space, that was 125GB and after I exported the database by running the command:

gcloud sql export sql MY_INSTANCE gs://MY_BACKET/2018-10-18/mysql/MY_DB.mysql.sql.gz --database=MY_DB

When it finished I imported that backup into the replica machine, and... surprise! The used disk space was 180GB!
How is it possibile? Why was the second instance 55GB bigger?
Thanks in advance for the response.

George (Cloud Platform Support)

unread,
Oct 18, 2018, 12:10:12 PM10/18/18
to Google Cloud SQL discuss
Hello Matteo, 

Do you have binary logging enabled on your instance of origin? If binary logging is not enabled for the original instance, used for export, but enabled by default on the destination instance, use for import, you are expected to get different values for the used disk space. You may check related information on the "Restoring an Instance" documentation page

Matteo Di Sabatino

unread,
Oct 18, 2018, 12:23:44 PM10/18/18
to Google Cloud SQL discuss
Hi George,

Yes, it's enable on both. These are the results of the command 
gcloud sql instances describe

Original instance:
backupConfiguration:
    binaryLogEnabled: true
    enabled: true
    kind: sql#backupConfiguration
    replicationLogArchivingEnabled: false
    startTime: '19:00'

Backup instance:
backupConfiguration:
    binaryLogEnabled: true
    enabled: true
    kind: sql#backupConfiguration
    replicationLogArchivingEnabled: false
    startTime: 01:00

Is there something I'm missing?

George (Cloud Platform Support)

unread,
Oct 19, 2018, 10:35:06 AM10/19/18
to Google Cloud SQL discuss
Hi Matteo, 

At this stage, we need your project ID and the name of the two instances in question, to have a deeper look at this out-of-common situation. This is confidential information, and should not be published directly in forums with public visibility. You should rather send me a private message from the drop-down menu of the "reply" button at the top right of the window. You are encouraged to open a new issue in Public Issue Tracker, including all the information above. In PIT things will get investigated thoroughly, and you'll be able to follow developments with ease. 

Parth Gohel

unread,
Oct 19, 2018, 11:15:40 AM10/19/18
to google-cloud...@googlegroups.com
There is no private option on reply drop-down menu. How can i send private message?

On Fri, Oct 19, 2018 at 8:05 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:
Hi Matteo, 

At this stage, we need your project ID and the name of the two instances in question, to have a deeper look at this out-of-common situation. This is confidential information, and should not be published directly in forums with public visibility. You should rather send me a private message from the drop-down menu of the "reply" button at the top right of the window. You are encouraged to open a new issue in Public Issue Tracker, including all the information above. In PIT things will get investigated thoroughly, and you'll be able to follow developments with ease. 

--
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/71c7c786-4128-46af-8f58-f19bd9ddcb51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Parth Gohil
Rockers Technology.
Thank You.

George (Cloud Platform Support)

unread,
Oct 21, 2018, 1:50:01 PM10/21/18
to Google Cloud SQL discuss
Hello Parth, 

The message option you see in the drop-down menu is inherently private, as the message is directed to the addressee and not visible to anyone else.

Matteo Di Sabatino

unread,
Oct 24, 2018, 3:30:51 PM10/24/18
to Google Cloud SQL discuss
Any news on that?
Reply all
Reply to author
Forward
0 new messages