Version Support: 7.0.0
tprovision was previously known as tungsten_provision_slave and was renamed in v7.0.0
For instructions for releases older than this, please refer to the documentation here
The tprovision script allows you to easily provision, or reprovision, a database server using information from a remote host.
-c ] [
-h ] [
-m ] [
-p ] [
-s ] [
Table 9.64. tprovision Command-line Options
|Use to flag to the script that the node being provisioned needs to be a Primary. Valid for Composite Active/Active only. Forces the provision of a failed Primary and will reset services.|
|Show help text|
|Backup method to use. Valid methods are mysqldump or xtrabackup.|
|Port to use to connect to MySQL when using mysqldump, or ssh port when using xtrabackup.|
|Server to use as a source for the backup|
|Number of parallel threads to use for xtrabackup. Increasing this number on large databases may improve backup speeds. If not supplied, default will be based on the default for the revision of xtrabackup in use.|
It is recommend to run this script in a utility such as screen in case the terminal gets disconnected.
xtrabackup methods, the script will perform a
streaming backup from the source node to the target node.
The script will automatically put all replication services offline prior to beginning. If the services were online, the script will put them back online following a successful completion. All THL logs will be cleared prior to going online. The replicator will start replication from the position reflected on the source host.
Provisioning will fail from a Replica that is stopped, or if the Replica is not
The script will run validation prior to starting to make sure the needed scripts are available. The provision process will run Xtrabackup on the source server and stream the contents to the server you are provisioning. After taking the backup, the script will prepare the directory and restart the MySQL server
The script will run mysqldump by default.
The script only works with MySQL at this time.
The script will log output to the
To reprovision the Replica db3 from another Replica, db2. Using xtrabackup
tprovision --source db2 --method xtrabackup
To reprovision the Replica db3 from another Replica, db2. Using the default, mysqldump
tprovision --source db2
To reprovision the Primary db1 from the Primary, db4, in the remote cluster. Using Xtrabackup. This is only applicable to Composite Active/Active topologies
tprovision --source db4 -c --method xtrabackup