1. Stop postgresql service
cmd command
services.msc
find postgres service stop
2. Copy the database file
Copy the database file to the directory to be migrated
3. Modify the registry
Run cmd, enter regedit to open the registry, modify HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\postgresql-x64-9.1
\ImagePath
postgresql-x64-9.1 view version number