I had non-empty db and made backup it by:
pg_dump myBase > backup.sql
Then I must to delete db and now I am trying to restore it from backup.sql. So first I create database by:
create database myBase
grant privileges from psql
grant all privileges on database "myBase" to myUser
and then trying to recover from pg_dump by:
pg_dump myBase < backup.sql
And I didn't get any errors, but when I check tables by \dt
it's totally empty.
I have also tried restoring with:
psql -h localhost -d myBase-U myUser-f backup.sql
(no error, but no tables too)
psql myBase < backup.sql
(like above)
I have a little expieriences with dbs so I assume it should be something obvious for more experienced user.