首页 > 数据库 > > 恢复命令-基于时间点(全量/增量)恢复至当前集群
单机/主备/分布式部署模式下,基于时间点的集群恢复均支持磁盘或NBU介质的集群恢复,包括全量恢复和增量恢复。
恢复集群时会自动停止集群。
cd $ROACH_HOME执行恢复操作。
python GaussRoach.py -t restore --mode cluster --clean --master-port master_port --media-destination media_destination_path --media-type type --restore-target-time target_time --meta>metadata_path --backup-key backup_key
backup-key可以指向某次全量备份、累积增量备份或者差分增量备份。指向某次全量备份时,进行的是全量恢复。指向累积增量备份或者差分增量备份时,进行的是对应的增量恢复,此时需要注意的是,如果某全量备份已删除,用户无法使用基于该全量备份生成的增量备份来执行恢复操作。

恢复验证
恢复操作成功完成后,运行Roach主代理的屏幕上显示如下信息:
Parsing the configuration file.
Cleaning cluster.
Stopping cluster.
Successfully stopped cluster.
Successfully cleaned cluster.
Performing presetup activities...
SIA1000141083 : ##################################################100% 4.188M/s
SIA1000141082 : ##################################################100% 4.018M/s
SIA1000141081 : ##################################################100% 4.018M/s
Successfully restore data, takes time: 00:02:08.
Performing restore completed.
python GaussRoach.py -t start --media-type media-type示例
python GaussRoach.py -t restore --mode cluster--clean --master-port 6000 --media-destination /home/userA/backup --media-type Disk --restore-target-time "2019-01-21 19:05:48" --metadata-destination /home/userA/metadata
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3146357/ ,如需转载,请注明出处,否则将追究法律责任。