user2139745
user2139745

Reputation: 1811

heroku postgres dump - not working locally

I have done this:

heroku pgbackups:capture 
heroku pgbackups:url 
downloaded file from url obtained from above result

Created psql db "abc"

Ran this comamnd locally:

pg_restore --verbose --clean -no-acl --no-owner -U uname -d abc  ~/Downloads/b001.dump

output:

pg_restore: connecting to database for restore
pg_restore: implied data-only restore

I have loaded in 2ways. First created db, and directly ran pg_restore command. Then no tables created.

Then, thinking that dump contains only data, I have run migrations(means create table structure) on the new created db and ran pg_restore command. But still table data is empty.

Upvotes: 5

Views: 1936

Answers (1)

some
some

Reputation: 49632

If you are running the command exactly as you have written you have an error:

You have written -no-acl instead of --no-acl and are getting -a that means:

-a, --data-only

Restore only the data, not the schema (data definitions).

Upvotes: 8

Related Questions