7.6. Provision or Reprovision a Slave

The command performs three operations automatically:

  1. Performs a backup of a remote slave

  2. Copies the backup to the current host

  3. Restores the backup


When using tungsten_provision_slave you must be logged in to the slave that has failed or that you want to reprovision. You cannot reprovision a slave remotely.

To use tungsten_provision_slave :

  1. Log in to the failed slave.

  2. Select the active slave within the dataservice that you want to use to reprovision the failed slave. You may use the master but this will impact performance on that host. If you use MyISAM tables the operation will create some locking in order to get a consistent snapshot.

  3. Run tungsten_provision_slave specifying the source you have selected:

    shell> tungsten_provision_slave --source=host2
      NOTE  >> Put alpha replication service offline
      NOTE  >> Create a mysqldump backup of host2 »
      in /opt/continuent/backups/provision_mysqldump_2013-11-21_09-31_52
      NOTE  >> host2 >> Create mysqldump in »
      NOTE  >> Load the mysqldump file
      NOTE  >> Put the alpha replication service online
      NOTE  >> Clear THL and relay logs for the alpha replication service

    The default backup service for the host will be used; mysqldump can be used by specifying the --mysqldump option.

    tungsten_provision_slave handles the cluster status, backup, restore, and repositioning of the replication stream so that restored slave is ready to start operating again.


When using a Multisite/Multimaster topology the additional replicator must be put offline before restoring data and put online after completion.

shell> mm_trepctl offline
shell> tungsten_provision_slave --source=host2
shell> mm_trepctl online
shell> mm_trepctl status

For more information on using tungsten_provision_slave see Section 8.21, “The tungsten_provision_slave Script” .