标签:rman
RMAN常用维护命令
--list 查看备份信息
RMAN> list backup; RMAN> list backup of tablespace users; RMAN> list backup of datafile 2; RMAN> list backup of controlfile; RMAN> list backup of archivelog all; RMAN> list backup of archivelog until time =‘sysdate -1‘; RMAN> list backupset 56; RMAN> list copy; RMAN> list copy of tablespace users; RMAN> list copy of datafile 1; RMAN> list datafilecopy 6; RMAN> list copy of controlfile;
--
crosscheck:用于检测备份状态(AVAILABLE:可用;UNAVAILABLE :不可用;expired 过期(备份已经被os 删除了)(防止备份在os下被误删除)
RMAN> crosscheck backup; RMAN> crosscheck copy;
report 命令
report report schema; 查看目标库的物理结构 report need backup; 查看需要做备份的datafile report obsolete; 根据备份冗余策略来判断,那些备份是陈旧的(obsolete)
delete :删除备份
RMAN> delete backup of datafile 2; RMAN> delete backup of tablespace system; RMAN> delete backup ; RMAN> delete backup of controlfile; RMAN> delete noprompt backup of controlfile; ;删除noprompt 不提示 RMAN> delete copy; RMAN> delete copy of datafile 10; RMAN> delete copy of tablespace users; RMAN> delete expired backup; 删除过期的备份 RMAN> delete expired copy; RMAN> delete obsolete ;删除陈旧的备份 RMAN> delete noprompt obsolete; 删除不加提示
catalog 注册备份集
catalog :可以把手工备份的文件,转换到rman -------将手工备份注册为image RMAN> catalog datafilecopy ‘/disk1/backup/prod/hot_bak/users01.dbf‘; cataloged datafile copy datafile copy filename=/disk1/backup/prod/hot_bak/users01.dbf recid=68 stamp=759556193 -------将手工备份注册成备份集 RMAN> catalog backuppiece ‘/disk1/backup/prod/hot_bak/users01.dbf‘; ---------注册目录下所有的备份(image) RMAN>catalog start with ‘/ora_data/prod1/‘;
---change: 修改备份状态(用于对备份进行维护)
RMAN> change backupset 66 unAVAILABLE; RMAN> change backupset 66 AVAILABLE;
本文出自 “DBA的天空” 博客,请务必保留此出处http://kevinora.blog.51cto.com/9406404/1670952
标签:rman
原文地址:http://kevinora.blog.51cto.com/9406404/1670952