This should not be used as a means to relocate a database. The recommended way to move a database is to backup all cases via FTK, reinstall the database at the desired location, and restore your case backups.
Introduction: If the database folders have been moved, renamed, or the database junction links have otherwise been broken, FTK will fail to connect to PostgreSQL even if the PostgreSQL service starts successfully. The following steps will help you repair the PostgreSQL junction links.
- Stop the PostgreSQL service.
- Download and extract the attached ListSymLinks.zip
- Run the extracted ListSymLinks.cmd script to list your current junction links to see if any of them are broken
- If the script reports that they are broken, take note of the path(s) indicated to be missing
- Find each missing path in the TXT file that opens at the end of the script, and take note of its associated "JUNCTION" number (it's the number after "pg_tblspc/" on the line before the broken "Substitute Name" path).
- For each missing path found in step 4, take note of the last folder name in the path, and search your PC for that folder, taking note of its new location. For example, if the broken path was "D:\pgData93\ad\ADG\adg_adg510_ts" you'd look for a folder named "adg_adg510_ts".
- Navigate to the "[pgData]\pg_tblspc" folder (within the "pgdata" folder) and delete the broken junction link(s) found in from step 5.
- Open a Command Prompt (as Administrator)
- Change the Command Prompt's directory (CD) to the extracted "ListSymLinks" folder
- For each broken junction link, run the following command to create a new junction point pointing to the destination found in step 10:
junction.exe [path_to_pgdata]\pg_tblspc\[number_from_step_5] [path_from_step_6]
Example: if my pgdata folder is at "D:\pgdata", the broken junction link number was "17273", and I want it to point to "C:\ADG_ADG510_TS", the command would be as follows:
junction.exe "D:\pgdata\pg_tblspc\17273" "C:\ADG_ADG510TS"
- After performing step 10 for every broken junction link, start the PostgreSQL service.
- Open FTK and verify correct functionality.