Important!

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.

Procedure:

  1. Stop the PostgreSQL service.
  2. Download and extract the attached ListSymLinks.zip
  3. Run the extracted ListSymLinks.cmd script to list your current junction links to see if any of them are broken
  4. If the script reports that they are broken, take note of the path(s) indicated to be missing
  5. 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).
  6. 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".
  7. Navigate to the "[pgData]\pg_tblspc" folder (within the "pgdata" folder) and delete the broken junction link(s) found in from step 5.
  8. Open a Command Prompt (as Administrator)
  9. Change the Command Prompt's directory (CD) to the extracted "ListSymLinks" folder
  10. 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_ADG510_TS"

  11. After performing step 10 for every broken junction link, start the PostgreSQL service.
  12. Open FTK and verify correct functionality.