• Configuration management commands that read data from the repository — such as files, diff, and cat — use the replica repository.
• Configuration management commands that write data to the repository — such as keep, promote, and merge — use the master repository. After the master repository has been modified, the local replica repository is automatically brought up to date. For details, see Synchronizing a Replica Manually, which describes how you can bring the local replica repository up to date when you are not writing data to the repository.The update operation works as follows when you execute it on a client that uses a replica server:
1. An implicit replica sync command is performed, copying database transactions from the master repository to the replica repository. This brings the replica database completely up to date.
2. A stat operation is performed on the replica server, to determine the state of the workspace stream and its backing stream.If a particular replica server is executing a mkreplica command, a request to perform a replica sync on that server might fail. Be careful to run mkreplica at a time when it is unlikely that any user or script is invoking replica sync.If a replica sync command does fail for this reason, first make sure that no mkreplica command is executing, then invoke replica sync again.Similarly, if a replica sync command is already in progress, in rare situations a client command sent to the same replica server might not complete correctly, causing an error message to be displayed. The change is made correctly on the master server in such situations. The user who issued the command can perform an update command to have the change reflected in the workspace.Use the replica archive command to remove unused container files from the depot’s storage directory on a replica server.The replica archive command activates the server_preop_trig trigger with a replica_archive command. The command lists each element for which the storage container was removed. For example:For more information on this command, see the replica command in the AccuRev CLI User’s Guide, or enter accurev help replica in the CLI.
1. Inform any users on the replica server of the change. Every user must log out and edit the acclient.cnf file (located in the AccuRev bin directory) to point to another server.
2. For each depot to be replicated, use a ZIP utility (or tar, or some other tool) to copy the data subdirectory of the depot’s slice. Example:
4. Replicate the depots with the command accurev mkreplica. Example:
6. For each replicated depot, move the slice’s data subdirectory aside. Example:
7. For each replicated depot, recreate the slice’s data subdirectory, using the copy created in Step 2. Example:To avoid this situation, create a “dummy” workspace at Site B for each heavily used stream, and create a script that updates all these workspaces. Then, set up a cron job (UNIX/Linux) or a Scheduled Task (Windows) to run the script on a regular basis. Ideally, the script would run at least once a day — before the start of Site B’s work day, but after the end of the work day of Site A (and any other sites). For example, this crontab line runs script update_replica_workspaces at 4:30AM every day:To enable data compression, add the following line to the acserver.cnf file on each replica server:Note: If your installation makes use of hardware compression, enabling data compression on the AccuRev replica server might decrease performance.
Micro Focus |