robguy21
9/17/2019 - 2:35 PM

Restoring a postgres database

The Command

pg_restore -c -U postgres -d postgres -v "/dump/path/dump.tar.gz"

The Options

-c Clean (drop) database objects before recreating them. (This might generate some harmless error messages, if any objects were not present in the destination database.)

-U User... the user you will be connecting with...

-d The database to use

-v V E R B O S E M O D E