data-engineer-handbook icon indicating copy to clipboard operation
data-engineer-handbook copied to clipboard

Fixed missing "-d" to specify the database name

Open rmueller opened this issue 1 year ago • 2 comments

Also added the complete syntax, I hope it helps someone.

rmueller avatar Nov 29 '24 21:11 rmueller

I was about to make the same PR, thanks @rmueller.

In my system (Mac with Intel chip, macOS 15.1) with Postgres 13.17, the steps to succesfully restore the database locally are the following:

createdb -U <username> postgres
createuser -U <username> postgres
pg_restore -U <username> -d postgres data.dump

At least in my Postgres version, the db and permissions have to be created before you restore the data.dump file

sfgarcia avatar Nov 30 '24 13:11 sfgarcia

Hi @rmueller did you use your computer's username to setup the database in postgres? I tried to use my computer's username and password which did not work, then I used a username and password I created in postgres which worked.

protokoul avatar Dec 03 '24 08:12 protokoul