PDA

View Full Version : SQL Service won't start with old data folder



Stake Monster
07-05-2009, 02:12 PM
I've been trying to fix this for 3 hrs but i can't seem to find a solution. I re-installed SQL, no anti-virus, etc.. When i run HEM for the first time it seems to connect but when I replace the Data folder with my old DB the service won't start at all. It says "Starting" and then just goes to "Stopped" after a while.

I tried starting it manually but to no avail. I've also tried putting the config files from the Data folder into the old one but that doesn't work either...

What could the problem be?

this is what my pg_hba file says:

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5


thanks for any ideas.. I've followed all the instructions given here before so this is quite frustrating.

fozzy71
07-05-2009, 02:41 PM
Are you sure you installed the same version as what your database was created with?

I am really not the best one to answer this probably, as I have never tried this process. I think I will give it a try later this week. Last week I did the backup/restore for the first time, for no other reason than the experience. I suppose I should do the same with this method.

I found some threads that might help you. This quote be _dave_ makes it sound like you want to have your \data folder and the rest of the folder structure (empty) in place before you install SQL. Then you install to where your data folder is, without using the 'initiate db cluster'.

http://forumserver.twoplustwo.com/showpost.php?p=5431754&postcount=1606


Fozzy, re: database stuff - depends what exactly is in the data folder (it has to be entirely all present and correct).

there's a thread started by theIrishThug in the past week or so about doing this, although it seems more basic the idea is the same - if you have a proper data directory structure, recreate the folder hierarchy and install postgres over the top without "initiate the cluster".

These other links may provide some help also. Beyond that I probably can't help much more myself, other than to suggest importing your HH archives. I would think if you ever want to do this it would be wise to save your downloaded copy of the postgresql.zip, so you you know you have the exact same version.

http://forumserver.twoplustwo.com/45/software/anyone-ever-move-postgresql-another-drive-204183/

http://forumserver.twoplustwo.com/45/software/any-way-move-database-without-backing-up-287779/

http://forumserver.twoplustwo.com/45/software/postgres-upgrade-did-i-just-completely-f-myself-269850/

http://forumserver.twoplustwo.com/45/software/postgresql-external-drive-261319/

Stake Monster
07-05-2009, 02:48 PM
edit: see below

will read the 2p2 threads..

Stake Monster
07-05-2009, 02:55 PM
I get it to work properly only when i use the default Data folder.. the service even starts then.

I am indeed using the same postgreSQL version but is there a way to make sure? In the PG_VERSION file it says 8.3. The old DB was in /8.3/ so I just downloaded the same version you guys link to from your site.

Stake Monster
07-05-2009, 04:01 PM
finally fixed it, only took 5 hours... After going through all the posts about SQL on the HEM forum what fixed it for me was re-installing again, putting Local Account under the service properties and then deleting the postmaster.pid file and restarting again.

that was VERY frustrating :) thanks for your help.