restorereplica
Applicability
Product | Command type |
---|---|
MultiSite | multiutil subcommand |
Platform |
---|
UNIX |
Windows |
Synopsis
- restorereplica
[ –cl/an clan-name ] [ –site site-name ] –fam/ily family-name
–u/ser username [ –p/assword ] password [ –force] [ –completed ]
[ –replace] [ replica... ]
Description
restorereplica replaces missing changes in a replica that has been restored from backup, in following manner:
- It causes the current replica to create special update packets that contain update requests to other replicas.
- It locks the current replica and marks the replica as being in the process of restoration.
- It causes lsreplica –long to indicate which replicas must send restoration updates to the current replica.
The current replica remains in the restoration state until you have received and applied (using syncreplica –import) all the restoration updates needed to bring the replica up to date with the state of the family. Collectively, these updates include all the changes to the family since the backup was made, including changes made in the current replica before its failure.
You cannot recover changes that were made after the last synchronization export from your current replica. For example, if your replica was backed up on Wednesday at 12:30 P.M. and your last synchronization export was Thursday at 3:00 P.M., you can recover all changes made until Thursday at 3:00 P.M. All changes made after that time are lost.
For a description of the replica restoration procedure, see "Restoring database replicas" in this guide.
Locking the replica
restorereplica locks the current replica. Locking it ensures that while restoration proceeds by running syncreplica –export and 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 and unlocks the replica.
Optimizing the restoration process
By default, restorereplica requires that the replica receive restoration updates from all other replicas in its 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.
Restrictions
You must have Super User privileges.
Options and arguments
Specifying the clan, site, and family
- Default
- Clan: First clan replicated at this site. If there is more than one dbset
connection registered on this host, –clan is required.
Site: Current site. If there is more than one site on this host, –site is required.
Family: No default; you must specify a family.
- –cl/an clan-name
- Name of the replica’s clan.
- –site site-name
- Name of the replica’s site.
- –fam/ily family-name
- User database family: Database name given to the user database when it was created.
Schema repository family: Not applicable. Restoring a member of a user database family automatically requests updates for its associated schema repository replica, if necessary.
Specifying a user name and password
- Default
- You must specify a user name and password.
- –u/ser user
- Name of a user with Super User privileges.
- –p/assword password
- Password associated with the specified user.
Suppressing interactive prompts
- Default
- restorereplica prompts you for confirmation.
- –f/orce
- Suppresses the confirmation step.
Reducing the number of required updates
- Default
- The replica requires restoration updates from all other members
of its family. The syncreplica command declares the replica
to be restored completely only after all the updates have been processed.
Important: 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 family in an irreparably inconsistent state.
- –completed
- Overrides normal restoration processing; marks the replica as restored and unlocks the database. If this option is used, no more restoration packet requests can be sent and no more restoration packets can be replayed at this replica.
- –rep/lace replica...
- Changes the subset of replicas from which restoration updates are required. Specify replica as a site name.
Examples
For an example of restoring a replica, see Restoring a replica from backup.