Search Postgresql Archives

Re: Help me please...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jacob@xxxxxxx 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.





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux