HostOnNet Blog

Restore PostgreSQL Database

Looking for Linux Server Admin or WordPress Expert? We can help.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.