新的 Heroku pg:backups public-url 提供什么类型的文件?

What type of file does the new Heroku pg:backups public-url provide?

我正在与 Heroku's new PGBackups functionality and I have used the public-url command to download a backup 合作。该文件不是我习惯的格式。我期待一个可以用 Vim 或其他文本编辑器打开的 pg_dump 文件。有谁知道 public-url 产生的文件是什么?

pg_dump -Fc"custom" format

c

custom

Output a custom-format archive suitable for input into pg_restore. Together with the directory output format, this is the most flexible output format in that it allows manual selection and reordering of archived items during restore. This format is also compressed by default.

它会向您发送一个文件,您可以使用 pg_restore 命令。

例如,我可以通过以下方式下载文件:

curl -o /tmp/latest.dump <database_url>

然后恢复:

pg_restore --verbose --clean --no-acl --no-owner -h localhost -d <destination_database_name> /tmp/latest.dump