GaussDB-gs_roach
背景信息
数据库备份/恢复工具。
gs_roach分为master进程和agent进程两种。其中,master进程只有在备份主节点上才有,agent进程在其它参与备份的节点上存在。master进程接受和建立来自所有agent进程的连接(长连接),并且通过这些连接,来推动整个分布式备份流程的步骤和状态,具体原理如下:
- master进程采用ip白名单认证,只允许来自数据库实例内的ip连接。
- master进程只有在启动之后的固定超时时间内(通常为10分钟)接受来自agent进程的tcp连接请求。如果在该时间段内,数据库实例内所有节点的agent进程没有都连接上,那么master进程会报错退出,该次备份失败;如果在该时间段内,数据库实例内所有节点的agent进程都和master进程成功建连,那么在最后一个agent进程建连成功之后,master进程就会停止对master port的侦听,并开始正式的备份操作。后续整个备份过程中master进程不再接受其他任何agent进程的连接请求。
语法
gs_roach OPTIONS ACTION [backup | restore | update | delete | uploadmeta | downloadmeta | obs-upload | obs-download | obs-delete | query | retrieve]
参数说明
OPTION:
- --master
- --with-serverlog
- --enable-crc
- --master-ip <master ip>
- --master-port <master port>
- --media-type <media-type>
- --media-destination <media-destination>
- --metadata-destination <path>
- --restore-buffer-threshold <buffer-threshold>
- --backup-key <backup key>
- --prior-backup-key <backup key>
- --backup-type <backup type>
- --exec-delay-ddl
- --single
- --single-group-nodeid
- --single-group-datapath
- --snapshot-action
- --split-local-disk-storage
- --standby-mode
- --no-display
- --resume-backup
- --resume-restore
- --target-backup-key <backup key>
- --incremental
- --restore-new-cluster
- --restore-configs
- --parallel-restore
- --skip-restore-gtmcm
- --compression-level <level>
- --compression-type <type>
- --cbm-recycle-level <level>
- --reader-thread-count <count>
- --reader-thread-file-count <count>
- --reader-thread-file-size <size>
- --buffer-size <size>
- --buffer-block-size <block-size>
- --max-backup-io-speed <speed>
- --parallel-process <count>
- --failure-retry-count <count>
- --resource-retry-count <count>
- --retry-wait-time <time>
- --logging-level <logging level>
[FATAL|ERROR|WARNING|INFO|DEBUG|DEBUG2]. 设置日志的等级,默认的等级是warning.
- --logging
- --enable-logging <True/False>
- --log-filesize
- --filesplit-size
- --log-filecount
- --logging-path
- --dbname <dbname>
- --username <username>
- -W <password>
- --pipeline
- --cpu-relinquish-time
- --cpu-relinquish-size
- --max-memory-usage <value>
- --pre-disk-space
- --mark-failed
- --mark-transparent
- --mark-corrupted
- --mark-restored
- --obs-server-ip <address>
- --bucket-name <bucketname>
- --cluster-unique-id <value>
- --content <content>
- --obs-ak <obs ak>
- --obs-sk <obs sk>
- --prefetch-block <block-bum>
- --verbose
- --miniaturized-deployment
- --old-cluster-hostname <hostname>
- --all-backups
- --backup-key <backup key>
- --overwrite
- --related-backup-keys
- --start-time
- --version
- -V
- --help
- --disable-ssl
- --remote-ip
- --remote-port
- --remote-config
- gbr-sys-data-recovery
- gbr-db-list
该版本不支持对M-compatibility的数据库进行细粒度恢复。
- gbr-table-list
该版本不支持对M-compatibility的表进行细粒度恢复。
- aux-db-path
- retrieve-type
- retrieve-shard
- retrieve-local-path
- retrieve-start-lsn
- retrieve-end-lsn
- archive-clean-timeout
- archive-clean-shard
- archive-clean-stoplsn
- last-backup-endtime
- reverse
- skip-restore-dn
- download-target-path
- archive-backup-version
- pdb-list
执行PDB级备份时,指定当前进行备份的PDB列表。执行恢复时,指定当前进行恢复的PDB列表。
该版本不支持对M-compatibility的PDB进行细粒度备份恢复。
- gbr-pdb-sys-data-recovery
- flash-restore-node-count
ACTION:
浙公网安备 33010602011771号