Synchronizing a Replica Manually

During the course of development, your local replica repository typically becomes out-of-date with respect to the master repository. This occurs when other users send commands to other replica servers or directly to the master server. In both such cases, new transactions are entered in the master repository, but are not entered in the your local replica repository.

At any time, you can enter this CLI command to bring your local replica repository up to date:

accurev replica sync

This transfers data from the master repository site slice to the replica repository site slice. It also transfers database transactions from the master repository to the replica repository — but only for the depots that are included in the local replica. It does not transfer the corresponding storage files for keep transactions. See On-Demand Downloading of a Version's Storage File (below).

A replica sync command is performed automatically on the local replica after each operation that is initiated by a client of the local replica, and that makes a change to the repository. See Using a Replica Server.

Note: You never need to synchronize directly with other replicas; synchronizing with the master is sufficient to bring your replica up to date.

On-Demand Downloading of a Version's Storage File

As a performance optimization, AccuRev copies database transactions only — not storage files that hold the contents of keep versions — when it synchronizes the master repository with a replica repository during:

  • a replica sync command

  • the automatic replica synchronization that follows an operation, invoked by a client using a replica server, that modifies the repository

Storage files for versions are downloaded from the master repository to the local replica repository during an update. (See Using a Replica Server.) The storage file for an individual version is downloaded when a client using a replica server explicitly references that version. Examples:

accurev cat -v talon_dvt/12 mywork.c
accurev diff -v talon_dvt/12 mywork.c

Both these commands cause the storage file for version talon_dvt/12 of file mywork.c to be downloaded to the local replica repository before the command itself is executed.