简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM