I need to get databases from the old PostgreSQL folder that was in Program Files (win 10).
I tried changing the data path through the registry (ImagePath
value after "-D" at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\postgresql-x64-12)
from the current to the old PostgreSQL data folder.
I also tried replacing files in the current folder from PostgreSQL with old ones (replaced data for C:\Program Files\PostgreSQL\12\data\base and C:\Program Files\PostgreSQL\12\data\global)
.
In both cases, an error occurred when trying to start the postgresql-x64-12 service. Error message: the postgresql-x64-12 service on local computer started and then stopped.
Some services stop automatically if they are not in use by other services or programs.
How can I get databases from old ../Program Files/PostgreSQL
folder?