Quick Start
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Migration
Data Query
Maintenance and Monitoring
Performance Tuning
Troubleshooting
Reference Guide
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.
Add or initialize a Standby Master node in the YMatrix database system.
Below is a detailed description of the command-line arguments:
| Subcommand | Parameter | 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 from this port, searches for an available port for Standby Master to listen on. 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 |
The mxinitstandby command must be executed by a user with sudo privileges on the Master host (except for 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 others. In such cases, delete the generated file and re-run the command under a sudo-enabled user to regenerate it.
Below is a step-by-step usage example:
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.