1

My Windows Server was damaged, I have installed the new OS, PostgreSQL12. The folder \PostgreSQL\12\data is in good state. No database dumps. Is it possible to restore database having the folder?

1 Answer 1

1

As long as you're using the same architecture (32-bit vs 64-bit), and it's still on Windows Server, you should be able to use that by copying it to the right location on your new OS's filesystem and start it. Just be prepared for it to take longer to start if the database wasn't shut down cleanly as it will have to replay the transaction logs before coming online.

Sign up to request clarification or add additional context in comments.

3 Comments

ok, copy entire folder \data to the new server's folder \data (may be overwrite smth) or some sub-folders only?
Yes, you need the entire data directory. Although if there's a pre-existing cluster, I guess you can't use the same location. You will need to register a new cluster.
I have no clusters, it is standalone server. Ok, will try and return back

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.