Quick onboard
Deployment
Data Modeling
Connecting
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
This document describes the data restoration tool mxrestore.
mxrestore is used to restore data backed up by the mxbackup tool.mxrestore supports restoring data that was backed up to S3 object storage using mxbackup.| Parameter | 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 parameter can be specified multiple times for multiple schemas |
| --exclude-schema-file file | File containing a list of schemas to exclude |
| --exclude-table table | Table to exclude during restore; this parameter can be specified multiple times for multiple tables |
| --exclude-table-file file | File containing a list of tables to exclude |
| --help | Show help information |
| --include-schema schema | Specify schema to include in restore; can be used multiple times for multiple schemas |
| --include-schema-file file | File listing schemas to include in restore |
| --include-table table | Specify table to include in restore; can be used multiple times for multiple tables |
| --include-table-file file | File listing tables to include in restore |
| --incremental | 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 when encountering issues during restore |
| --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 a specified database instead of the original backup database |
| --redirect-schema schema | Restore data into a specified schema instead of the original backup schema |
| --run-analyze | Run ANALYZE on restored tables |
| --timestamp timestamp | Timestamp to identify the backup, 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
Restore data backed up by mxbackup in S3 object storage.
$ mxrestore --timestamp 20221208185654 --plugin-config /tmp/s3-config-file.yaml
Note!
The log file directory for themxbackuptool is<gpadmin_home>/gpAdminLogs/gpbackup_s3_plugin_timestamp.log, where the timestamp format isYYYYMMDDHHMMSS.
Note!
For more information about backup and restore in YMatrix, see Backup and Restore. For details on using the S3 object storage plugin withmxbackup, refer to mxbackup.