Exporting Data for Import into Cloud SQL

This pages describes how to create a SQL dump file that is usable by Google Cloud SQL. You can use these files to import your data into Cloud SQL.

Creating a SQL dump file

  • --no-owner Ownership change commands must not be included in the SQL dump file.
  • --format=plain Only plain SQL format is currently supported by Cloud SQL.

From a command line, run pg_dump:

pg_dump -U [USERNAME] --format=plain --no-owner [DATABASE_NAME] > [SQL_FILE].sql

For more information about pg_dump, see the pg_dump reference.

What's next

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud SQL for PostgreSQL