I am pretty new with postgresql and pgAdmin and I made a beginner error. I changed the hard drive of my computer and unfortunately (and stupidly I really admit) I have not make a backup of my database in pgAdmin3 before. Is there anyway I can manage to transfer it back from my old hard drive to the new one? I tried to copy the file "Data" of pgAdmin from the old hard drive to the new one but it did not succeed. Is there any hidden file that would retain information of my database still on the old hard drive? If I re-install the old hard drive, would I be able to access the database back?
if anyone have any idea I would be really glad, thanks
Do as "Richard Huxton" suggested, then On Windows you need may need to set PG as a Service
Run the following on the command line (as adminstrator):
pg_ctl.exe register -N postgres -D "C:\Program Files\PostgreSQL\9.6\data"
Start the service
answer from: Register and run PostgreSQL 9.0 as Windows Service
Three steps are required:
Then just point the configuration at it (data_directory) and start it up. If there are any problems, check the logs for details - it'll probably be permissions.
Sometimes it's convenient to do all this in a virtual machine if you have that sort of stuff set up already.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With