From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Help me please... |
Date: | 2009-07-09 21:07:48 |
Message-ID: | 4A565C24.90807@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
jacob(at)aers(dot)ca wrote:
>
> if you used default locations I believe it should be (this is from
> memory mind) under c:\program files\postgres\<version>\data\
>
>
>
> data is the folder you want.
>
>
>
First, verify the location of pgdata...
sc qc pgsql-8.3
(I'm assuming this is 8.3, modify for other versions)
note the value of the -D parameter on the BINARY_PATH_NAME, like...
BINARY_PATH_NAME : D:\postgres\8.3\bin\pg_ctl.exe runservice
-w -N "pgsql-8.3" -D "D:\postgres\8.3\data\"
hence, mine is D:\postgres\8.3\data\
If you've reinstalled postgres from scratch, you'll likely have to do a
bit of dinking around.
First,
NET STOP pgsql-8.3
Now, MOVE the current data dir somewhere safe, and COPY/S your backup of
the DATA directory to the active location. Then, use the 'security'
dialog in file explorer, or the CACL command line, to grant the
'postgres' user full control over the data directory and all files in it.
command line version:
cacls /t /e /c /g postgres:f \path\to\data
if this postgres user already existed from before, but the reinstalled
postgres service is having problems starting, you may need to reset the
service account password. pick a random forgettable password. I'm
going to use shattUp373treHodhu (random generator output)...
NET USER postgres shattUp373treHodhu
SC CONFIG pgsql-8.3 password= shattUp373treHodhu
upper case doesn't matter in the commands except for the password itself
but the spacing around the password= is critical (none before the =,
one space after)
then try
net start pgsql-8.3
and with any luck, your data is all intact.
its absolutely critical if you've reinstalled postgres that you install
the same version as you used before.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-07-09 21:18:10 | Re: Postgres 8.4 literal escaping |
Previous Message | jacob | 2009-07-09 20:27:57 | Re: Help me please... |