ZedZip
ZedZip

Reputation: 6462

How to restore PostgreSQL database?

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?

Upvotes: 1

Views: 66

Answers (1)

Thom Brown
Thom Brown

Reputation: 2029

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.

Upvotes: 1

Related Questions