HostOnNet Blog


Restore PostgreSQL Database

To restore Database in PostgreSQL, run

pg_restore -h POSTGRESQL_SERVER_IP -p 5432 -U POSTGRESQL_USERNAME -d POSTGRESQL_DB_NAME -v backup.dump

-p = specify port used by PostgreSQL server.
-d = Connect to database and restore directly into the database.
-v = Specifies verbose mode.

Example

pg_restore -h alhl0zmwt4aqai.wzucpp2p4whb.us-west-2.rds.amazonaws.com -p 5432 -U flashweb -d billing_db -v latest.dump


Posted in Database