Exporting Data for Import into Cloud SQL

This page describes how to create a SQL dump file that is usable by Google Cloud SQL. You can use this file 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

Send feedback about...

Cloud SQL for PostgreSQL