2. The AccuRev Repository : Restoring the Repository

Restoring the Repository
You can use the procedures described in this section to restore both master and replica servers. If you are restoring up a replica server, be sure to also read Restoring a Replica on page 9.
Restore Procedure
If you have backed up the repository according to the directions above, you can easily restore the repository to the time at which you executed the backup command:
1.
2.
Restore the backup copy of the storage directory, using the backup/restore tool that you used to create it.
Note: if your site slice is in a non-standard location (as specified by the SITE_SLICE_LOC setting in the acserver.cnf file — see Server Configuration File on page 16), or if some depots are in non-standard locations (perhaps moved with the chslice command), then your job in restoring the backup of the entire repository is more complicated than simply to restore the storage directory.
3.
Steps 2 and 3 will restore the backed-up data to standard locations on an existing AccuRev system. For more complex restore operations, see Moving the AccuRev Server and Repository to Another Machine on page 55.
4.
maintain restore <backup-file-name> <db-admin>
The maintain command will prompt you for the database admin password.
For more information on the maintain restore command, refer to the CLI documentation.
Note: the AccuRev Database Server must be running for this command to succeed.
5.
Note: suppose a particular depot’s files were not backed up for several hours after the backup command was executed. Even if several new versions of file gizmo.c were created with the keep command during that interval, the backed-up AccuRev metadata will have no record of those transactions. But you can still retrieve a copy of any or all of those versions from the backup medium: it’s in a container file in the data subdirectory of the depot directory.
Restoring a Replica
As mentioned previously, you can use the procedure described in Restoring the Repository to restore both master and replica servers. If you are restoring up a replica server, note the following additional considerations:
After restoring the backed-up metadata, refer to the backed-up acserver.cnf file to ensure that the MASTER_SERVER, PORT, LOCAL_SERVER, and LOCAL_PORT settings are correct for your replication environment.

Borland