Search This Blog

Tuesday, November 20, 2012

Import postgresql dump file on windows

Importing dump file from pgAdmin III's "restore" option is not intuitive. It can be done easily from console, however. Just call psql from postgres bin directory located in your installation folder.

c:\Program Files\PostgreSQL\9.1\bin\psql --username=your_username --file=your_dump_file.txt --dbname=your_database


3 comments:

  1. On Ubuntu try:
    sudo -u postgres psql --dbname=your_db_name --file=your_script_file_name

    ReplyDelete
  2. this helped my co-worker solve his problem. thanks in behalf of him :)

    ReplyDelete

If you like this post, please leave a comment :)