mxdeletesystem

Deletes a YMatrix database instance and its data.

1 Description

  • Functionality
    The mxdeletesystem utility stops the postgres processes on all Segment instances and the Master instance, then removes all data directories, restoring the system to its pre-deployment state.

  • Prerequisites

    • Move all backup files out of the Master and Segment data directories.
    • Ensure that YMatrix is running.
    • If you are currently in a Segment data directory, change to another location. Running the tool from within a Segment data directory will cause it to fail with an error.

Note!
mxdeletesystem only deletes the database instance and data. It does not remove the operating system user mxadmin, nor does it uninstall the YMatrix software.

2 Options

Option Description
-c or --db-cluster-id Specifies the target database cluster ID. Uses the default ID if omitted.
-a or --no-prompt Skips the confirmation prompt before deletion. By default, the user is prompted for confirmation.
-t or --timeout Sets the command timeout duration. Default is 1 minute.
-q or --quiet Runs in quiet mode. Output is suppressed on screen but still written to log files.
-h or --help Displays help information.

3 Examples

Delete a database cluster, with confirmation prompted after printing cluster information.

Note!
mxdeletesystem must be executed by a user with sudo privileges on the Master host (except mxadmin, use absolute path /opt/ymatrix/matrixdb5/bin/mxdeletesystem).

$ mxdeletesystem

Delete a database cluster without confirmation.

$ mxdeletesystem -a

Note!
YMatrix 5 introduces a new database architecture. Use mxdeletesystem to delete clusters. This tool is not compatible with gpdeletesystem. For earlier versions, use gpdeletesystem.

See Also: mxaddmirrors, mxinitstandby.