CROSSCHECK: 确认 rman repository 与 实际的备份集 是否同步.
你可以先使用 LIST 命令查看你之前做的备份的情况, 然后使用 CROSSCHECK 命令来确认这些文件还存在没有. 如果RMAN没有找到这些文件, 它将更新 respository 显示 expired超期. 你可以用过 LIST EXPIRED 查看那些文件超期了, 将超期的文件删除.
CROSSCHECK BACKUP; -- 用于确认备份集, backup pieces, and proxy copies, 默认的是会确认整个数据库
CROSSCHECK COPY; -- cross check datafile copies, control file copies, archived redo logs, and image copies of archived redo logs. 默认的也是全部数据库都确认.
DELETE BACKUPSET 102;
DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE users; -- nopromt 没有提示的意思
DELETE OBSOLETE; – delete all backups, copies, and archived redo log files
例如: DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS;
You can use the DELETE INPUT option with the BACKUP command to direct RMAN to delete the input files upono successful creation of the backup set. You can specify this option only when backing up archived redo log files, datafile copies, or backup sets. (一般我还是用在备份 archivelog )
可以改变备份集的状态, 例如: CHANGE BACKUPSET 100 UNAVAILABLE;
CHANGE DATAFILECOPY ‘/DB01/BACKUP/users01.dbf’ UNAVAILABLE;
CHANGE BACKUP OF CONTROLFILE UNAVAILABLE;
CHANGE COPY OF ARCHIVELOG SEQUENCE BETWEEN 230 AND 240 UNAVAILABLE;