The tungsten_prep_upgrade Command
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 [arguments]
Where:
| Option | Description | Product |
|---|---|---|
--alldb | Loop through all services on this node (based on existing tungsten_* schemas). Cannot be used with the --service option. | CTTR |
--debugAliases: -d | Debug mode is VERY chatty, avoid it unless you really need it. | CTTR |
--dumpAliases: -d | Backup tracking databases using mysqldump. | CTTR |
--dumpdbAliases: -D | Specify database to dump. | CTTR |
--forceAliases: -f | Force the operation. | CTTR |
--helpAliases: -h | Show help text. | CTTR |
--hostAliases: -H | Specify the database hostname or IP address. Default: 127.0.0.1 | CTTR |
--keep | Get the current tracking position schema for the specified service and save it as json to a text file. The file will be named ~/position-[service]-YYYYMMDDHHMMSS.txt | CTTR |
--offlineAliases: -o | Take the specific service to the offline-deferred state at-heartbeat. | CTTR |
--offlinehbAliases: -O | Specify the name of the heartbeat for the offline-deferred operation. Default: offline_for_upg | CTTR |
--passwordAliases: -w | Specify the database password. | CTTR |
--pathAliases: -p | Full path to the cross-site replicator directory. Default: /opt/replicator | CTTR |
--portAliases: -p | Specify the database listener port. Default: 13306 | CTTR |
--restoreAliases: -r | Load the tracking database backup for the specified service. --all cannot be used with --restore. | CTTR |
--serviceAliases: -s | Specify the service name to act upon. | CTTR |
--start | Bring up the cross-site replicator process. | CTTR |
--stop | Gracefully shut down the cross-site replicator process. | CTTR |
--targetdirAliases: -T | Specify directory target for dump. | CTTR |
--userAliases: -u | Specify the database user. | CTTR |
--verboseAliases: -v | Show verbose output. | CTTR |
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 --offlineshell> tungsten_prep_upgrade --service tokyo --offlinenote
To invoke the actual deferred offline set with
--offline, use the below CLUSTER-specifictrepctlcommand (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 --dumpshell> tungsten_prep_upgrade --service tokyo --dump - Load (restore) the tracking database backup for the specified service.
--allis unavailable with--restore.shell> tungsten_prep_upgrade -s nyc -u tungsten -w secret -rshell> tungsten_prep_upgrade -s tokyo -u tungsten -w secret -r~or~shell> tungsten_prep_upgrade --service nyc --user tungsten --password secret --restoreshell> tungsten_prep_upgrade --service tokyo --user tungsten --password secret --restorenoteA 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)