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 (&%€(!

 

 

 

Link to comment
Share on other sites

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?!?

Link to comment
Share on other sites

  • 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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.