Bootstrap FreeKB - Postgres (SQL) - Restore a Postgres database using the psql command
Postgres (SQL) - Restore a Postgres database using the psql command

Updated:   |  Postgres (SQL) articles

This assumes you have already Backed a Postgres database using the pg_dump command.

Let's say you have created a file named foo.backup that contains a backup of the foo database.

pg_dump foo > /path/to/foo.backup

 

Here is how you can import (restore) the foo database using the psql command.

psql --username john.doe --dbname foo < /path/to/foo.backup

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter d5893b in the box below so that we can be sure you are a human.