6.11. Restoring a Backup

If a restore is being performed as part of the recovery procedure, consider using the tungsten_provision_slave tool. This will work for restoring from the Primary or a Replica and is faster when you do not already have a backup ready to be restored. For more information, see Section 6.6.1.1, “Provision or Reprovision a Replica”.

To restore a backup, use the restore command to a datasource within cctrl :

  1. Shun the datasource to be restored, and put the replicator service offline using cctrl :

    [LOGICAL] /alpha > datasource host2 shun
    [LOGICAL] /alpha > replicator host2 offline
  2. Restore the backup using cctrl :

    [LOGICAL] /alpha > datasource host2 restore

By default, the restore process takes the latest backup available for the host being restored. Tungsten Cluster does not automatically locate the latest backup within the dataservice across all datasources.

Restoring within Multi-Active environments

The steps above cover a basic restore process in a single cluster, however, if the topology in use is a Multi-Active Topology, a few additional steps need to be taken

Composite Active/Active: Prior to issuing the restore command, the additional sub-services and cross-site replicators need to be stopped, using the following examples as a guide:

cctrl> use east_from_west
cctrl> datasource host2 shun
host2-shell> trepctl -all-services offline

Multi-Site/Active-Active: Prior to issuing the restore command, the additional sub-services and cross-site replicators need to be stopped, using the following examples as a guide:

host2-shell> trepctl -all-services offline
host2-shell> mm_trepctl offline

After restoring the database, explicitly restart the cross site replicator:

host2-shell> mm_trepctl online