postresql - How to recovery DB after system re-install



  • I had to reinstall the system on my laptop and change ssd (C:). My postgres was installed on another disc (D:), this drive was fine and I still use it, but the Postgres client was deleted with system reinstallation.

    i don't have any backup of DB.

    Now I wonder if there is any option to copy/recover data from old postgres (I have all the folders)?

    Can I install postgres in the same place it used to be on the hard drive (D:)? or it wont work or overwrite existing data ??



  • pg data is stored under D:\PostgreSQL\13\data unless you configured it elsewhere, backup the entire PostgreSQL\13 folder just in case, reinstall the same version and put the data back, should work


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2