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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With