Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Configuration Parameters
SQL Reference
FAQ
This document describes the mxinitstandby tool, which is used to add or initialize a standby Master instance in a YMatrix database system.
Adds or initializes a Standby Master in the YMatrix database system.
The following table provides detailed information about the command-line options:
| Subcommand | Option | Description | Optional |
|---|---|---|---|
| init | Converts collected information into a basic plan | ||
| --db-cluster-id | Database cluster ID. Used to identify a unique database cluster | Optional | |
| --host | Host on which to add the Standby Master | Required | |
| --port | Starting port from which to search for an available port for Standby Master listening. Default starts from 5432 |
Optional | |
| plan | Generates a deployment plan | ||
| --init-file | Absolute path to the redirected output file from the init command |
Required | |
| setup | Executes the deployment | ||
| --plan-file | Absolute path to the redirected output file from the plan command |
Required |
mxinitstandby must be executed by a user with sudo privileges on the Master host (except mxadmin, use absolute path /opt/ymatrix/matrixdb5/bin/mxinitstandby). If the mxinitstandby init command is mistakenly run under a non-sudo user, a mxinitstandby.init file will be generated under that user's context, readable but not writable by other users. In such cases, delete the generated file and re-run the command under a sudo-enabled user to regenerate it.
Below is an example workflow:
Note!
You must complete the entire Standby Master addition process as described below.
$ mxinitstandby init --host <standby_hostname> > /tmp/mxinitstandby.init
Note!
Replace<host>with the actual hostname.
Generate a deployment plan based on the collected information, outlining specific deployment steps.
$ mxinitstandby plan --init-file /tmp/mxinitstandby.init > /tmp/mxinitstandby.plan
Execute the deployment.
$ mxinitstandby setup --plan-file /tmp/mxinitstandby.plan --mode cli
Note!
YMatrix 5 introduces a new database architecture. Use themxinitstandbytool to add a Standby Master. It is not compatible withgpinitstandby. Earlier versions may usegpinitstandby.