INFORMATICS

The Best

How to restore PostgreSQL database from .tar file

Inicio desactivadoInicio desactivadoInicio desactivadoInicio desactivadoInicio desactivado
 

How to restore PostgreSQL database from .tar file

pg_restore -c -U postgres -d client03 -v "/tmp/client03.tar" -W

-c to clean the database
-U to force a user
-d to select the database
-v verbose mode, don't know why
"$$" the location of the files to import in tmp to get around permission issues
-W to force asking for the password to the user (postgres)

Search