Restoring a replica from backup
This topic describes how to restore a replica from a backup.
Procedure
- Use your vendor database tools to restore a copy of the replicated database from backup.
- After restoring the database set (schema repository and user databases) on the master site, ensure that all schemas are checked in in the restored schema repository before proceeding to step 3.
- Use the restorereplica command to start the restoration
procedure.
This command places a special lock on the replica. Between this point and the completion of step 7, the syncreplica –import command temporarily adjusts the lock to permit the update, and then restores the full lock. During this time, you can only modify the replica by using the syncreplica –import command.
- Verify that all update packets have been processed at their destination replicas.
- At the restored replica, generate update packets for all
other replicas in the family and send the packets to the sibling replicas.
You can send the packets by using your standard synchronization method.
To recover the replica more quickly, create the packets with the syncreplica
–export –fship command.
Because your replica is in the special restoration state, each outgoing update packet includes a special request for a return acknowledgment. It also includes your replica's old epoch numbers, which are now its current epoch numbers as a result of the restoration in step 1. Each destination replica uses these numbers to roll back its row for your replica.
- Wait for each replica in the family to send an update packet
to the restored replica. As in step 5, you can accelerate the creation
and delivery of the update packets.
Collectively, these update packets include all the operations that occurred between the time of the backup and the last update that your replica sent before its storage was lost, including operations that originated at your replica. The packets also include more recent operations that originated at other replicas. And each incoming packet includes the requested return acknowledgment from the sending host.
- Process the incoming update packets by using the syncreplica
–import command. The command reports that replica restoration
is complete when your replica has received return acknowledgments
from all other replicas in its family:
Database <name> is unlocked after restoration.
Development work in the replica can now resume.