mxbackup

1. Description

mxbackup performs parallel backups of a YMatrix cluster. The backed-up data must be restored using mxrestore.

2. Command-Line Options

Option Description
--backup-dir directory Absolute path where backup files are written.
--compression-level level Compression level, ranging from 1 to 9; default is 1.
--data-only Back up only table data, not schema.
--dbname db Database to back up.
--debug Output debug-level log messages.
--exclude-schema schema Exclude the specified schema from backup; can be used multiple times to specify multiple schemas.
--exclude-schema-file file File containing a list of schemas to exclude from backup.
--exclude-table table Exclude the specified table from backup; can be used multiple times to specify multiple tables.
--exclude-table-file file File containing a list of tables to exclude from backup.
--from-timestamp timestamp Start timestamp for incremental backup; must be used with --incremental.
--help Display help information.
--history Show historical timestamps in the current backup directory.
--include-schema schema Include only the specified schema in the backup; can be used multiple times to specify multiple schemas.
--include-schema-file file File listing schemas to include in the backup.
--include-table table Include only the specified table in the backup; can be used multiple times to specify multiple tables.
--include-table-file file File listing tables to include in the backup.
--incremental Perform an incremental backup, applicable to AO tables; must be used with --from-timestamp.
--jobs num Number of concurrent connections during backup; default is 1.
--leaf-partition-data When backing up partitioned tables, create a separate data file for each leaf partition.
--metadata-only Back up only metadata (schema, DDL), not table data.
--no-compression Do not compress table data.
--plugin-config file Specify the location of the plugin configuration file.
--quiet Suppress all non-warning, non-error log messages.
--single-data-file Write all backup data to a single file instead of one file per table.
--verbose Print detailed log messages.
--version Print tool version and exit.
--with-stats Back up table statistics.
--without-globals Do not back up global metadata (e.g., roles, tablespaces).

3. Examples

Back up the demo database:

mxbackup --dbname demo

Back up the demo database excluding the twitter schema:

mxbackup --dbname demo --exclude-schema twitter

Back up only the twitter schema in the demo database:

mxbackup --dbname demo --include-schema twitter

Back up the demo database and store backup data in /home/mxadmin/backup:

mxbackup --dbname demo --backup-dir /home/mxadmin/backup