5

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.

4
  • You can look at the dump file, it is a normal text file. There should be a lot of CREATE TABLE at the top of the file. Commented Nov 12, 2013 at 4:04
  • 1
    I think I found the problem: you are using -no-acl instead of --no-acl.. and getting -a that means "import only data". Commented Nov 12, 2013 at 4:05
  • wowwww, thanks @some, please answer so I can mark as answer Commented Nov 12, 2013 at 4:07
  • Added it as an answer so you can mark it as accepted AND vote on it :) Commented Nov 12, 2013 at 4:10

1 Answer 1

8

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).
Sign up to request clarification or add additional context in comments.

1 Comment

lol, thanks. Just did this myself. I don't think I would have ever seen that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.