Copied postgreSQL folder while it was stil running

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

Copied postgreSQL folder while it was stil running

Postby Puke » Thu Oct 16, 2008 2:59 pm

After reading the FAQ here i feel like a complete ass for doing this but here it goes.
So i copied the entire postgreSQL folder while it was still running, and now it states "Failed to establish a connection to '127.0.01 ' (the local host name)
I've tried stopping and restarting postgreSQL, i deleted the postmaster file but it still doesn't work.
Is there any way to get access of my data again? like reinstalling postgreSQL ?
also: i can't access the file on my old HD anymore

Thanks in advance
Puke
 
Posts: 2
Joined: Thu Oct 16, 2008 2:49 pm

Re: Copied postgreSQL folder while it was stil running

Postby WhiteRider » Thu Oct 16, 2008 4:01 pm

So you took a copy of the postgres folder onto another computer and now you don't have [access to] the orignal computer any more?

Have a look at this thread, which sounds like a similar issue - I'll get Kraada to take a look here too, and see if he found anything out.
viewtopic.php?f=17&t=13250#p61872
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Copied postgreSQL folder while it was stil running

Postby kraada » Thu Oct 16, 2008 4:13 pm

Please see this post of mine, which is in a thread with essentially the same problem.

It may get it working but it depends on exactly how hard you were pushing things at the time; more work may be required . . . as I say there, if pg_resetxlog fails, let me know what the output says and we'll go from there in figuring out how to fix it.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Copied postgreSQL folder while it was stil running

Postby Puke » Fri Oct 17, 2008 12:24 pm

Thanks for the fast replies,
a friend of mine gave me this advice and it worked like a charm:

1.) Save your "data" folder. You can find it in C:\Program Files\PostgreSQL\8.3.
2.) Uninstall postgresql completely and delete everything under C:\Program Files\PostgreSQL\8.3. EXCEPT the data folder.
3.) Install PostgreSQL again, but untick "Initialize Database cluster".
4.) click on "connect" again and it should work
Puke
 
Posts: 2
Joined: Thu Oct 16, 2008 2:49 pm

Re: Copied postgreSQL folder while it was stil running

Postby WhiteRider » Fri Oct 17, 2008 12:36 pm

Thanks for posting this.

I'll add it to the FAQ, but can you just please clarify what do in 4). Where are you clicking 'Connect'?
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Copied postgreSQL folder while it was stil running

Postby aleonn » Sun Oct 19, 2008 6:35 am

I tried to follow those instructions, but I can't find the option to untick "Initialize Database cluster".

First, I uninstalled postgresql from the add/remove programs options in the Control Panel. I uninstalled PT3 Beta 19, then reinstalled PT3 Beta 19. Upon starting PT3, I'm prompted to "Configure PostgreSQL Installation" where I enter the default settings. At this stage, I can't find the option to untick "Initialize Database cluster". The PostgreSQL installation fails at "Initializing database cluster (this may take a minute or two)..." An error message pops up: "Failed to create temporary directory".
aleonn
 
Posts: 8
Joined: Sun Oct 12, 2008 7:29 am

Re: Copied postgreSQL folder while it was stil running

Postby WhiteRider » Sun Oct 19, 2008 6:46 am

Did you do the 'net user postgres /delete' part of the uninstall?
See this post for info: Total uninstall/reinstall of pt3

I think to get to the option to uncheck 'initialise DB cluster' you will need to do a manual install of postgres.
You should not need to do anything with your PT3 installation here - that is completely independent.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Copied postgreSQL folder while it was stil running

Postby aleonn » Wed Oct 22, 2008 5:30 am

I think some progress has been made, but I'm still running into an error.

I did the "net user postgres /delete." I also did the manual Postgres install (which allowed me to uncheck "initialize DB cluster"). However, the installation does not complete when it gets to "Setting filesystem permissions". The error log says "The data is invalid." I've uninstalled and reinstalled Postgres and PT3 multiple times with the same error.

I'm unable to link to my picasaweb image, but I'd be glad to PM you the log and jpg if they help.
aleonn
 
Posts: 8
Joined: Sun Oct 12, 2008 7:29 am

Re: Copied postgreSQL folder while it was stil running

Postby aleonn » Wed Oct 22, 2008 5:31 am

Oh, here's the link to the screenshot: http://picasaweb.google.com/aleonn/PT3# ... 0338817154
aleonn
 
Posts: 8
Joined: Sun Oct 12, 2008 7:29 am

Re: Copied postgreSQL folder while it was stil running

Postby kraada » Wed Oct 22, 2008 9:02 am

Try moving the data directory elsewhere, (say C:\data\backup\ for now), so that the entire C:\Program Files\PostgreSQL\8.3\data directory is completely empty.

The reinstall should complete normally then, at which point you should be able to overwrite the new (and empty) data directory in C:\Program Files\PostgreSQL\8.3\data\ directory with the backup of the data directory and that may do the trick for you.
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 26 guests

cron
highfalutin