Cant find info to move DBs to a different drive

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Cant find info to move DBs to a different drive

Postby abstractls » Wed Nov 19, 2008 6:33 pm

Ok I have looked everywhere and even the FAQ points to something we can't view so how do I move my Postgres DBs to a different drive as my C: drive is near full
abstractls
 
Posts: 23
Joined: Thu Mar 27, 2008 4:43 pm

Re: Cant find info to move DBs to a different drive

Postby WhiteRider » Thu Nov 20, 2008 5:19 am

What do you mean by the FAQ points to something you can't see? What link are you using?
Can you see this?: Database / Postgres FAQ
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Cant find info to move DBs to a different drive

Postby abstractls » Fri Nov 21, 2008 6:06 am

Under how do I move my Db to another drive when you follow the link it says

Information

You are not authorised to read this forum.
abstractls
 
Posts: 23
Joined: Thu Mar 27, 2008 4:43 pm

Re: Cant find info to move DBs to a different drive

Postby WhiteRider » Fri Nov 21, 2008 11:01 am

OK, that's because I'm an idiot..
I'll quote the contents of that thread across to here and change the link in the FAQ.

Please note: This is not a 'proper' solution - it's more a workaround to fix something that someone tried.

OP wrote:Hi guys, bought myself a new velociraptor, and am trying it out.
Originally, i had a C drive, and a 500gig E drive, which had pt3 and postgres on it.

Now, i have a 300gig drive, which is the F drive.

I want to put everything from the E drive (only 160gig used, not the full 500) onto the F drive, and then use that.

My problem is this. Drive clone didnt really want to do it properly, so i just copied and pasted all of the folders from the E to the F drive

PT3 and the other programs load properly, but postgres doesnt!
Pt 3 loads ok, but then it will not connect to the db. I get the red unable to login to db. REeason could not connect to server connection refused 0x00000274d/10061 is the server runnin on host localhost and accepting tcp/ip connecttion on port 5432

Any ideas on what i can do? I really dont want to reimport 20 million hands!

When i tried to remove the postgres password, and edit the hba.conf file, notepad opens, and says the system cannot find the path specified.

I assume that postgres is looking for my E drive, which is unplugged atm,

How can i get postgres to look for everything that is present on my new speedy velociraptor drive F, instead of the old one on E?


postgres expert wrote:Go in services management. edit the postgresql service, change the references to E:\ to F:\ - this will be where to find the pg_ctl.exe command, the bin folder and the data folder.

If you do this properly, postgres will work again after a reboot.


OP wrote:Thanks, i think i am more than halfway there!

I can now get pt3 to run off my F drive, but still need the E drive plugged in.

Maybe i need to reinstall pt3 or postgres onto the F drive?

But i am afraid if i do this, particularly with postgres, i wont be able to use my existing db- tried something like this last time, and couldnt get the old db into the new drive!


That's the end of the discussion, so as I said it's not a full solution.

From my (uneducated in postgres) standing, I think the 'best' way to do this would be to backup your database, and then uninstall postgres and re-install it on the other drive, but one of the postgres experts may contradict me.
If you're going to do anything like this, make sure you test your backup first, and keep a copy of the original hand history files too, just in case.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Cant find info to move DBs to a different drive

Postby kaisersoze » Sun Dec 07, 2008 11:18 am

i went to services on my computer.
I selected "postgreSQL database Server 8.2" services and properties on it.
I saw the path for pg_ctl.exe and data but i can't modify the text to choose another drive for my data (info : I stopped the service before).
kaisersoze
 
Posts: 55
Joined: Sun Oct 26, 2008 11:02 am

Re: Cant find info to move DBs to a different drive

Postby kraada » Sun Dec 07, 2008 11:49 am

What version of windows are you running: XP or Vista?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Cant find info to move DBs to a different drive

Postby kaisersoze » Sun Dec 07, 2008 12:32 pm

kraada wrote:What version of windows are you running: XP or Vista?


i'm running XP SP2
kaisersoze
 
Posts: 55
Joined: Sun Oct 26, 2008 11:02 am

Re: Cant find info to move DBs to a different drive

Postby kraada » Sun Dec 07, 2008 12:45 pm

In the services management window, right click on the PostgreSQL service, click Properties. Are the boxes in that properties dialog the one greyed out? Those are the ones you need to change.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Cant find info to move DBs to a different drive

Postby kaisersoze » Sun Dec 07, 2008 1:32 pm

kraada wrote:In the services management window, right click on the PostgreSQL service, click Properties. Are the boxes in that properties dialog the one greyed out? Those are the ones you need to change.

Sorry i don't understand greyed out.
i'm in the general tab and on center i have a text area with the both path but i can't change the text.
kaisersoze
 
Posts: 55
Joined: Sun Oct 26, 2008 11:02 am

Re: Cant find info to move DBs to a different drive

Postby kraada » Sun Dec 07, 2008 1:37 pm

A box is considered to be "greyed out" when it is darker in color and you can''t click there to type.

You should be able to edit that data on the general tab, I'm not exactly sure why you can't.

If you have all of your hand histories, the easiest thing might be to uninstall PostgreSQL and reinstall it on the new drive, then reimport all of the data, and just delete the database from the old drive.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 25 guests

cron
highfalutin