The tungsten_prep_upgrade command is a utility script which assists in the migration process from earlier Multi-Site/Active-Active topologies to Composite Active/Active topologies.
For a full end-to-end example of using this script, see Upgrade/Convert: From Multi-Site/Active-Active (MSAA) to Composite Active/Active (CAA)
tungsten_prep_upgrade [--all|--service] {service} [--path {fullpath_to_replicator_dir}] [arguments]
Where:
If --{service|all} is not specified, tungsten_prep_upgrade will attempt to derive a list of one or more service names from trepctl services.
For operations that require MySQL access, tungsten_prep_upgrade will attempt to auto-locate the database user and password from tpm reverse.
Below are various examples:
Take all replicator services offline automatically, or take a specific service offline:
shell>tungsten_prep_upgrade -o
~or~ shell>tungsten_prep_upgrade --service london --offline
shell>tungsten_prep_upgrade --service tokyo --offline
To invoke the actual deferred offline set with
--offline
, use the below CLUSTER-specific
trepctl command (i.e. from
/opt/continuent
, not
/opt/replicator
) on the Primary hosts within each
cluster:
shell> trepctl heartbeat -name offline_for_upg
Get (keep) the current tracking position schema for the specified service and save it as json to a text file (default: ~/position-{service}-YYYYMMDDHHMMSS.txt)
shell>tungsten_prep_upgrade -g
~or~ shell>tungsten_prep_upgrade --service nyc --get
(NOTE: saves to ~/position-nyc-YYYYMMDDHHMMSS.txt) shell>tungsten_prep_upgrade --service tokyo --get
(NOTE: saves to ~/position-tokyo-YYYYMMDDHHMMSS.txt)
Gracefully shut down the cross-site replicator process:
shell> tungsten_prep_upgrade --stop
Backup (dump) tracking databases using mysqldump (default: tungsten_{service})
shell>tungsten_prep_upgrade -d --alldb
~or~ shell>tungsten_prep_upgrade --service london --dump
shell>tungsten_prep_upgrade --service tokyo --dump
Load (restore) the tracking database backup for the specified service. --all is unavailable with --restore.
shell>tungsten_prep_upgrade -s nyc -u tungsten -w secret -r
shell>tungsten_prep_upgrade -s tokyo -u tungsten -w secret -r
~or~ shell>tungsten_prep_upgrade --service nyc --user tungsten --password secret --restore
shell>tungsten_prep_upgrade --service tokyo --user tungsten --password secret --restore
A restore may take place after the cross-site replicator is uninstalled, and so certain information is required on the command line (i.e. service, user and password)