mxrestore restores data backed up by the mxbackup utility.
| Option | Description |
|---|---|
| --backup-dir directory | Absolute path to the backup data to be restored. |
| --create-db | Create the database before restoring data. |
| --data-only | Restore only table data, not metadata. |
| --debug | Output debug-level log messages. |
| --exclude-schema schema | Schema to exclude during restore. This option can be specified multiple times to exclude multiple schemas. |
| --exclude-schema-file file | File containing a list of schemas to exclude. |
| --exclude-table table | Table to exclude during restore. This option can be specified multiple times to exclude multiple tables. |
| --exclude-table-file file | File containing a list of tables to exclude. |
| --help | Display help information. |
| --include-schema schema | Specify schema to restore. This option can be specified multiple times to include multiple schemas. |
| --include-schema-file file | File containing a list of schemas to restore. |
| --include-table table | Specify table to restore. This option can be specified multiple times to include multiple tables. |
| --include-table-file file | File containing a list of tables to restore. |
| --incremental | Perform incremental restore, applicable to AO tables. |
| --jobs num | Number of concurrent connections during restore. Default is 1. |
| --metadata-only | Restore only metadata, not table data. |
| --on-error-continue | Log errors and continue restoration upon encountering issues. |
| --plugin-config file | Specify the location of the plugin configuration file. |
| --quiet | Suppress all non-warning, non-error log messages. |
| --redirect-db db | Restore data into the specified database instead of the one used during backup. |
| --redirect-schema schema | Restore data into the specified schema instead of the one used during backup. |
| --run-analyze | Run ANALYZE on restored tables after restoration. |
| --timestamp timestamp | Timestamp of the backup to restore, in the format YYYYMMDDHHMMSS. |
| --truncate-table | Truncate existing data in tables being restored. |
| --verbose | Print detailed log messages. |
| --version | Print tool version and exit. |
| --with-globals | Restore global metadata. |
| --with-stats | Restore statistics. |
Restore the backup with timestamp /home/mxadmin/backup from directory 20210820143820:
mxrestore --backup-dir /home/mxadmin/backup --timestamp 20210820143820