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:
-
Make sure that no user or script process is using the depot, and stop the AccuRev and database servers:
-
Move the
site_slice
and/ordb
directories to their new location(s). -
Open
acserver.cnf
in a text editor and change theSITE_SLICE_LOC
definition to point to the newsite_slice
directory location. -
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: -
Change directory to the new
db
directory
and open thepostgresql.conf
file in an editor. Change the value oflog_directory
to point to thelogs
directory under the newsite_slice
location, e.g.: -
Start the database server:
-
If you moved the
site_slice
directory, register theacserver.cnf
change with the database: -
Start the AccuRev server process:
-
Verify that the
db
directory path is correct:
Linux/Solaris:
acserverctl dbstop
Windows: In the services.msc utility, stop the AccuRev Server and AccuRev DB Server services.
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 newdb
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
Linux/Solaris:
log_directory = '/opt/AccuRev/storage/site_slice/logs'
Windows:
log_directory = 'C:\\AccuRevStorage\\site_slice\\logs'
Linux/Solaris:
acserverctl dbstart
Windows: In the services.msc utility, start the AccuRev DB Server service.
<ac-install>\bin\maintain server_properties update
Linux/Solaris:
acserverctl start
Windows: In the services.msc utility, start the AccuRev Server service.
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.