7. Replication of the AccuRev Repository : Installing and Configuring AccuRev in a Replication Environment

Installing and Configuring AccuRev in a Replication Environment
To install AccuRev software for replication, see the AccuRev Installation and Release Notes.
Once AccuRev replication software has been installed, use the procedures below to correctly configure your replica and master server(s).
Caution: Enabling replication poses a potential security risk. Before proceeding, be sure to read Synchronization Security.
Configure an AccuRev Server as a master server
Log in to the master and stop the AccuRev Server as described in Starting and stopping AccuRev in the AccuRev Installation and Release Notes.
Edit the acserver.cnf file, located in the AccuRev bin directory. Add the following line:
Note the MASTER_SERVER and PORT settings in the acserver.cnf file. You’ll need these settings when configuring the replica server below.
Create a new AccuRev username (replica-user) that will be used as the user identity for requests from a replica server.
Configure a Replica server
Edit the acserver.cnf file, which is located in the AccuRev bin directory.
Change the keyword MASTER_SERVER to LOCAL_SERVER, and change the keyword PORT to LOCAL_PORT. But don’t change the value of either setting.
Add new MASTER_SERVER and PORT settings, using the values of these settings on the master server. (These are the settings you noted in Step 4 above..)
After these edits, the four lines might look like this:
MASTER_SERVER = masthost
PORT = 5050
LOCAL_SERVER = replhost
Note: there is no relationship between the LOCAL_PORT and PORT numbers. They can be the same or different.
Important! After editing acserver.cnf, you must restart the AccuRev server. If you have edited the values for SITE_SLICE_LOC, MASTER_SERVER, or PORT, you must also run the maintain server_properties update command before the new values will take effect. See ‘The ‘maintain’ Utility for more information.
Establish an AccuRev User Identity for the AccuRev Server Process
These steps ensure that the replica server process has an AccuRev username (replica-user ) with enough rights to access all the files in the master repository. AccuRev ACL permissions control access to depots and streams for specified AccuRev users and groups.
Caution: As of AccuRev 5.2, your site may have also implemented the optional element-level security (EACLs) feature. If you are using element security (EACLs) to control access to your data, you must ensure that permissions are correctly set for replica-user. If they are not correctly set, the replica may not be able to fetch any data from the master server, or it may be possible for a user to log into the replica and access elements that the replica is not supposed to have access to. See Setting Permissions for a Replica Server for more information.
Be sure to use the same replica-user username on both the replica and the master.
Create an operating-system user replica-user, and then log in as that user.
UNIX/Linux: Edit the server configuration file so that replica-user is the identity of the replica AccuRev Server. See Operating-System User Identity of the Server Processes.
Windows: Reconfigure the AccuRev Server service to run as replica-user, instead of as LocalSystem. In the Control Panel’s Services program: open the Properties window for the AccuRev service, go to the Log On tab, select “This account”, and enter the actual value of replica-user and its Windows password.
Next, establish replica-user’s AccuRev-level credentials:
Set environment variable ACCUREV_HOME to replica-user’s home directory. (Note: Make sure that the path to the home directory does not include any spaces.)
Create a “permanent” session file for user replica-user, for accessing the AccuRev Server on the master server from the client machine replica:
accurev login -n -H <mast-server-host>:<mast-server-port> replica-user
Password: ********
The –n option makes this session file valid indefinitely.
Synchronize the Site Slice
Perform these steps on the replica server:
Run the accurev synctime command to ensure that the replica server time is synchronized with the master server time.
Run the accurev replica sync command to copy site-specific data from the master server to the replica server. In particular, this command makes the AccuRev Server on the replica aware of all the depots on the master server.
Indicate the Depots to be Replicated
The AccuRev repository on the replica server now has an up-to-date site slice, but the repository doesn’t yet contain detailed data on any depots.
Log in to the replica server. See Authenticating a Replica User on the Master if you would like to authenticate all replica server logins on the master server.
accurev login repl_user
Password: ********
Note: If repl_user on the replica server and the replica user defined on the master server bear the same name, there are now two session files for repl_user, one for accessing the master server and the other for accessing the replica server.
accurev show -fix depots
In the XML-format output, the depots that exist in the master repository, but are not replicated on the replica server, are listed with this attribute:
ReplStatus = "missing"
For each depot that is to be replicated on the replica server, execute a mkreplica command. For example, if depots named widget, gadget, and cust_support are to be replicated:
> accurev mkreplica -p widget
Created replica of depot ’widget’.
Synchronizing ...
> accurev mkreplica -p gadget
> accurev mkreplica -p cust_support

Micro Focus