This page provides best practices for importing and exporting data with Cloud SQL. For step-by-step instructions for importing data into Cloud SQL, see Importing Data. For step-by-step instructions for export your data, whether it is in Cloud SQL or an instance you manage, see Exporting Data.
Best practices for importing and exporting
The following are best practices you should consider when importing and exporting data:
- Don't use Requester Pays buckets
- Use the correct flags when you create a SQL dump file
- Compress data to reduce cost
Don't use Requester Pays buckets
You cannot use a bucket that has Requester Pays enabled for imports and exports from Cloud SQL.
Use the correct flags when you create a SQL dump file
If you do not use the correct procedure when you export your data to a SQL dump file, your import might not be successful. For information about creating a SQL dump file for import into Cloud SQL, see Exporting data.
Compress data to reduce cost
Cloud SQL supports importing and exporting both compressed and
uncompressed files. Compression can save significant storage space on
Cloud Storage and reduce your storage costs, especially when you are
exporting large instances. When you export a SQL dump or CSV file, use a
file extension to compress the data. When you import a file with an
.gz, it is decompressed automatically.