我已经完成了这个任务:
在本地运行了以下命令:
heroku pgbackups:capture
heroku pgbackups:url
downloaded file from url obtained from above result
Created psql db "abc"
在本地运行了以下命令:
pg_restore --verbose --clean -no-acl --no-owner -U uname -d abc ~/Downloads/b001.dump
输出:
pg_restore: connecting to database for restore
pg_restore: implied data-only restore
我已经进行了两种方式的加载。首先创建了数据库,然后直接运行pg_restore命令。但是没有创建任何表。
然后,考虑到转储只包含数据,我在新创建的数据库上运行了迁移(即创建表结构),然后运行了pg_restore命令。但是表数据仍为空。
CREATE TABLE
语句。 - some-no-acl
而不是--no-acl
,并且得到了-a
,这意味着“仅导入数据”。 - some