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 (below).
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:
Stop the AccuRev Server. (See Controlling Server Operation.)
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), 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.
Restore any backups of scripts or triggers, using the backup/restore tool that you used to create them.
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.
Restore the backed-up metadata:
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.
Restart the AccuRev Server. (See Controlling Server Operation.)
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 above to restore both master and replica servers. If you are restoring up a replica server, note the following additional considerations:
Restore the master server first.
Synchronized the replica servers using the replica sync command. See Synchronizing a Replica Manually for more information.
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.