达梦数据库的DMRMAN工具-管理备份(备份集校验)
DMRMAN 中使用 CHECK 命令对备份集进行校验,校验备份集是否存在及合法。
语法如下:
CHECK BACKUPSET '<备份集目录>'
[DEVICE TYPE <介质类型> [PARMS '<介质参数>']][DATABASE '<INI_PATH>'];
BACKUPSET:指定目标校验备份集目录。
DEVICE TYPE:指存储备份集的介质类型,支持 DISK 和 TAPE,默认 DISK,详见 1.4 介质管理层。
PARMS:只对介质类型为 TAPE 时有效,详见 1.4 介质管理层。
DATABASE:数据库 dm.ini 文件路径,若指定,则该数据库的默认备份目录将作为备份集搜索目录之一。
图例
校验特定的备份集
CHECK BACKUPSET…命令用于校验特定备份集,每次只能检验一个备份集。示例如下:
[dmdba@test ~]$ dmrman
dmrman V8
RMAN>
RMAN> CHECK BACKUPSET '/home/dmdba/backup/arch_all_bak_01';
CHECK BACKUPSET '/home/dmdba/backup/arch_all_bak_01';
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:00][Remaining:00:00:00]
check backupset successfully.
time used: 142.737(ms)
RMAN>
若备份集在数据库的默认备份目录下,可指定相对路径校验备份集,如下所示:
[dmdba@test ~]$ dmrman
dmrman V8
RMAN> BACKUP DATABASE '/dm8/data/DAMENG/dm.ini' BACKUPSET 'db_bak_for_check_02';
BACKUP DATABASE '/dm8/data/DAMENG/dm.ini' BACKUPSET 'db_bak_for_check_02';
file dm.key not found, use default license!
Database mode = 0, oguid = 0
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
EP[0]'s cur_lsn[63409], file_lsn[63409]
Processing backupset /dm8/data/DAMENG/bak/db_bak_for_check_02
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:02][Remaining:00:00:00]
backup successfully!
time used: 00:00:03.227
RMAN>
RMAN> CHECK BACKUPSET 'db_bak_for_check_02' DATABASE '/dm8/data/DAMENG/dm.ini';
CHECK BACKUPSET 'db_bak_for_check_02' DATABASE '/dm8/data/DAMENG/dm.ini';
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:00][Remaining:00:00:00]
check backupset successfully.
time used: 146.589(ms)
RMAN>
更多内容请查看官方文档《DM8备份与还原》。