Moving the db or site_slice Directories

Before you start, consult A Word of Caution on Windows Zip Utilities.

Beginning with AccuRev 7.1, the site_slice and db directories are no longer required to be under the same parent directory. In AccuRev 7.1, the new default location for the db directory is under the DB_HOME directory, as defined in the acserver.cnf file. The site_slice directory remains defined by the SITE_SLICE_LOC definition in the acserver.cnf file.

One or both of the directories can be changed to any location by following these steps:

  1. Make sure that no user or script process is using the depot, and stop the AccuRev and database servers:

  2. Linux/Solaris: acserverctl dbstop
    Windows: In the services.msc utility, stop the AccuRev Server and AccuRev DB Server services.
  3. Move the site_slice and/or db directories to their new location(s).

  4. Open acserver.cnf in a text editor and change the SITE_SLICE_LOC definition to point to the new site_slice directory location.

  5. If you moved the db directory to a location other than DB_HOME/db (e.g., /databases/accurev/db or C:\databases\accurev\db), you need to:

  6. Linux/Solaris: Define a new (permanent) environment variable to the new db location, e.g.:
    export ACCUREV_DB_DATA=/databases/accurev/db
    Windows: From a command window, unregister the existing AccuRev DB Server service and re-register it with the new db location, e.g.:
    <ac-install>\postgresql\9.5\bin\pg_ctl.exe unregister -N "AccuRev DB Server"
    <ac-install>\postgresql\9.5\bin\pg_ctl.exe register -N "AccuRev DB Server" -D "C:\databases\accurev\db" -w
  7. Change directory to the new db directory and open the postgresql.conf file in an editor. Change the value of log_directory to point to the logs directory under the new site_slice location, e.g.:

  8. Linux/Solaris: log_directory = '/opt/AccuRev/storage/site_slice/logs'
    Windows: log_directory = 'C:\\AccuRevStorage\\site_slice\\logs'
  9. Start the database server:

  10. Linux/Solaris: acserverctl dbstart
    Windows: In the services.msc utility, start the AccuRev DB Server service.
  11. If you moved the site_slice directory, register the acserver.cnf change with the database:

  12. <ac-install>\bin\maintain server_properties update
  13. Start the AccuRev server process:

  14. Linux/Solaris: acserverctl start
    Windows: In the services.msc utility, start the AccuRev Server service.
  15. Verify that the db directory path is correct:

  16. Linux/Solaris: From the command line, enter ps -ef | grep postgresql and verify that the db directory path listed after the "-D" option is correct.

    Windows: In the services.msc utility, right-click on the AccuRev DB Server process, select "Properties" and verify that the directory path listed after the "-D" option is correct.