restorereplica

Restores VOB replica from backup

APPLICABILITY

Product Command type

MultiSite

multitool subcommand


Platform

UNIX

Windows


SYNOPSIS

restorereplica [ -c·omment comment | -cfi·le comment-file-pname | -cq·uery

| -cqe·ach | -nc·omment ] [ -f·orce ] [ -override ]
[ -invob vob-selector | [ -rep·lace ] replica-selector ... ]

DESCRIPTION

Execute this command IMMEDIATELY after restoring a VOB replica from backup. Proceeding with normal development (and generating new changes) at a restored replica before executing this command can lead to IRREPARABLE inconsistencies among the replicas in a VOB family.

restorereplica replaces missing changes in a VOB replica that has been restored from backup, as follows:

  1. Causes the current replica to create special update packets that contain update requests to other replicas.

  2. Locks the current replica's VOB object and marks the replica as being in the process of restoration.

  3. Increments the recovery incarnation for the replica.

  4. Causes lsreplica -long to indicate which replicas must send restoration updates to the current replica.

The current replica remains in the restoration state until your site has received and applied (using syncreplica -import) all the restoration updates needed to bring the replica up to date with the state of the VOB family. Collectively, these updates include all the changes to the VOB family since the backup was made, including changes made in the current replica before its failure. During the process of restoration, the lsreplica -long command annotates its listing to indicate which replicas must send restoration updates to the replica.

For a description of the replica restoration procedure, see Restoring and Replacing Replicas.

LOCKING OF THE REPLICA

restorereplica locks the current replica's VOB object. This ensures that while restoration proceeds through execution of syncreplica -import commands, no other changes are made to the current replica.

When syncreplica applies the final required update, it displays a message indicating that the restoration process is complete. At this point, use the cleartool unlock vob: command to unlock the restored VOB replica, enabling normal development to proceed.

OPTIMIZING THE RESTORATION PROCESS

By default, restorereplica requires that the replica receive restoration updates from all other replicas in its VOB family (either directly or indirectly). Only after all the updates are imported does the syncreplica command display the message indicating that restoration is complete.

In some cases, you can relax this requirement without compromising the correctness of the restoration process. The replica will be brought up to date if it receives a restoration update from only one replica-the last one to which the replica sent an update before it was restored from the backup version. You can specify the name of that last-updated replica (or a list of replicas, one of which must be the last-updated one) to restorereplica. syncreplica displays the restoration-completed message after receiving restoration updates from all the specified replicas.

CAUTION: Making a mistake in using this optimization can make the restored replica irreparably inconsistent with other replicas.

RESTRICTIONS

Identities: You must have one of the following identities:

Locks: No locks apply.

Mastership: No mastership restrictions.

OPTIONS AND ARGUMENTS

EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by the standard ClearCase user profile (default: -cqe). See EVENT RECORDS AND COMMENTS in the multitool reference page. To edit a comment, use cleartool chevent.

-c·omment comment-string | -cfi·le comment-file-pname | -cq·uery | -cqe·ach | -nc·omment

Overrides the default with the specified comment option.

SUPPRESSING INTERACTIVE PROMPTS. Default: restorereplica prompts you for confirmation.

-f·orce

Suppresses the confirmation step.

SPECIFYING THE VOB FAMILY. Default: Processes the replica that contains the current working directory.

-invob vob-selector

Processes the current replica in the specified VOB family. Specify vob-selector in the form [vob:]pname-in-vob

pname-in-vob

Pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted)


REDUCING THE NUMBER OF REQUIRED UPDATES. Default: The replica requires restoration updates from all other members of its VOB family. The syncreplica command declares the VOB to be restored completely only after all the updates have been processed.
CAUTION: Incorrect use of these options allows new changes to be made to the replica before all missing changes are received from other replicas. This may place the entire VOB family in an irreparably inconsistent state.
replica-selector ...

Specifies a subset of replicas from which updates are required before syncreplica declares the VOB to be restored completely. Specify replica-selector in the form [replica:]replica-name[@vob-selector]

replica-name

Name of the replica (displayed with lsreplica)

vob-selector

VOB family of the replica; can be omitted if the current working directory is within the VOB.

Specify vob-selector in the form [vob:]pname-in-vob

pname-in-vob

Pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted)


-rep·lace replica-selector ...

Changes the subset of replicas from which restoration updates are required.
-override

Overrides normal restoration processing and declares the VOB to be restored completely. The lsreplica -long command no longer annotates any replicas as needing to provide updates, and you can use cleartool unlock vob: to place the replica back in normal service.
When you specify this option, the command displays a list of replicas from which updates have not been received and prompts you to cancel the operation or continue.

EXAMPLES

For an example of restoring a replica, see Restoring and Replacing Replicas.

SEE ALSO

chepoch, lsepoch, lsreplica, syncreplica