mxinitstandby

This document describes the mxinitstandby tool, which is used to add or initialize a Standby Master instance in a YMatrix database system.

1 Description

Add or initialize a Standby Master node in the YMatrix database system.

2 Command-line Arguments

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

3 Usage Example

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.

  1. Collect host information and partial configuration of the deployed database. ``
    $ mxinitstandby init --host <standby_hostname> > /tmp/mxinitstandby.init

    ``

Note!
Replace <host> with the actual hostname.

  1. Generate a deployment plan based on the collected information, outlining specific deployment steps. ``

    $ mxinitstandby plan --init-file /tmp/mxinitstandby.init > /tmp/mxinitstandby.plan

    ``

  2. Execute the deployment. ``

    $ mxinitstandby setup --plan-file /tmp/mxinitstandby.plan --mode cli

    ``

Note!
YMatrix 5 introduces a new database architecture. Use the mxinitstandby tool to add a Standby Master. It is not compatible with gpinitstandby. Earlier versions may use gpinitstandby.

See Also: mxaddmirrors, mxdeletesystem