I've encountered following error message when I'm trying to import a postgres dump file to Google Cloud SQL.
The input is a PostgreSQL custom-format dump. Use the pg_restore command-line client to restore this dump to a database. This may take a few minutes. While this operation is running, you may continue to view information about the instance.
Please let me know how to import a postgres dump file (which is hosted on Google Cloud Storage) to Google Cloud SQL?
I got the same error below:
Because I exported and archived
apple
database tobackup.sql
in-Fc
(custom format) with pg_dump as shown below:Then, I tried to import archive
backup.sql
toorange
database with psql which must be used to import non-archive files:So, I did it with pg_restore which must be used to import archive files, then I could solve the error. *My answer explains how to export and archive a database with
-Fc
and-Ft
and my answer explains how to import a database: