使用RMAN进行备份和恢复的常用命令
===================
连接到目标数据库(不用恢复目录数据库)
rman target / nocatalog
显示rman配置
RMAN> show all;
====================
报告目标数据库的物理结构
RMAN> report schema;
报告陈旧备份
RMAN> report obsolete;
报告不可恢复的数据文件
RMAN> report unrecoverable;
列出备份信息
RMAN> list backup;
RMAN> list backup of database;
RMAN> list backup of tablespace table_name;
RMAN> list backup of controlfile;
RMAN> list backup of spfile;
RMAN> list backupset id;
========================
校验备份信息:
RMAN> crosscheck backup;
RMAN> crosscheck backup of database;
RMAN> crosscheck backup of tablespace system;
RMAN> crosscheck backup of controlfile;
RMAN> crosscheck backup of spfile;
========================
删除备份
RMAN> delete obsolete; -- 删除陈旧备份
RMAN> delete expired backup;
RMAN> delete backupset id;
RMAN> delete backup; -- 删除所有备份
=========================
改变备份集的状态
RMAN> change backupset id unavailable; -- available
改为长期备份
RMAN> change backupset id keep forever logs;
RMAN> change backupset id keep until time 'sysdate+60' logs;
RMAN> change backupset id nokeep;
阅读(1188) | 评论(0) | 转发(0) |