This page describes how to create a SQL dump file that is usable by Cloud SQL. You can use this file to import your data into Cloud SQL.
For general best practices for importing data into Cloud SQL, see Best Practices for Importing and Exporting Data.
Creating a SQL dump file
pg_dump to create your SQL dump file with the following flags:
--no-ownerOwnership change commands must not be included in the SQL dump file.
--format=plainOnly plain SQL format is currently supported by Cloud SQL.
From a command line, run
pg_dump -U [USERNAME] --format=plain --no-owner [DATABASE_NAME] > [SQL_FILE].sql
For more information about
pg_dump, see the