Thursday, August 29, 2019

[google-cloud-sql-discuss] Re: best way to Export Cloud SQL database

Hi George,

thanks for your response.
i did read pretty carefully the mentioned documentation but nothing is mentioned there about the actual locking thing.

as mentioned the final command i've used was mysqldump db table --quick --skip-lock-tables --single-transaction | gzip > /tmp/mytable.gz
as you can see we do mention the DB and the specific table we want to export.
i've also used the other flags to make the export faster , but it wasnt clear that the table will be locked afterall (i've checked it with show open tables).

anyway when i've switched now to gcloud sql export the export operation took few minutes and completed successfully for the entire DB so seems like this approach is better for us.
(probabaly cause the export resides on gcloud, while on the mysqldump approach is on remote server).


10x
On Thursday, August 29, 2019 at 12:22:58 AM UTC+3, George (Cloud Platform Support) wrote:
Hello Chen, 

You should refer to the "Best practices for importing and exporting data" documentation page, of value in itself, but also for the link to Exporting data for import into Cloud SQL, with a highly significant sub-chapter on "Exporting without views using mysqldump" sub-chapter. You must use the --databases option to specify an explicit list of databases to import, and this list must not contain the mysql system database.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7b63aaeb-5979-4c02-9523-b1bd616e05d7%40googlegroups.com.

No comments:

Post a Comment