Jump to content

[SOLVED] Importing from Windows desktop to localhost


Mr. Green

Recommended Posts

I have been searching for threads the entire day and cannot seem to find the answers I'm looking for. Please help.

I have an approx. 30 MB database called losa that I have exported using the inbuild feature in phppgadmin. The dump is called dump.sql.

I have created a test environment on my windows where I want to import the dump to my postgres 8.3 (localhost). I don't want to link directly to the live database.

The test environment db is also called losa and it is created with the same usernames etc. I just need it to be filled out with tables and relations from the dump. The dump path is: C:\Documents and Settings\dump.sql.

 

Sounds simple enough but (&%€(!

 

 

 

I just use the pgAdmin III interface to perform such tasks.  Right click on the db and search through the pop-up menu for the option that allows you to restore.

 

Or you can probably do it from the command prompt.  Did you read the postgre manual?!?

  • 1 month later...

It is solved now, I made a dump of the sql and then i used the command prompt with this line:

psql -1 -f dump.sql DB_name postgres

 

(first i located the dump file in command prompt). Once you know it's simple but damn it has taken me long time. I hope you guys with similar problem will find this post quickly.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.