Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 690
user2139745 Avatar asked Nov 12 '13 03:11

user2139745


1 Answers

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).
like image 171
some Avatar answered Oct 14 '22 06:10

some