report need backup redundancy 1 tablespace users;删除"过期"备份

来源:互联网 发布:北京六趣网络总裁照片 编辑:程序博客网 时间:2024/05/02 02:20
RMAN> report need backup redundancy 1 tablespace users;Report of files with less than 1 redundant backupsFile #bkps Name---- ----- -----------------------------------------------------4    0     /u01/oracle/oradata/db01/users01.dbfRMAN> backup tablespace users;Starting backup at 03-FEB-15using channel ORA_DISK_1using channel ORA_DISK_2channel ORA_DISK_1: starting full datafile backupsetchannel ORA_DISK_1: specifying datafile(s) in backupsetinput datafile fno=00004 name=/u01/oracle/oradata/db01/users01.dbfchannel ORA_DISK_1: starting piece 1 at 03-FEB-15channel ORA_DISK_1: finished piece 1 at 03-FEB-15piece handle=/u01/oracle/11G/dbs/0vpua7f7_1_1 tag=TAG20150203T001015 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-FEB-15RMAN> report need backup redundancy 1 tablespace users;Report of files with less than 1 redundant backupsFile #bkps Name---- ----- -----------------------------------------------------RMAN> exitRecovery Manager complete.[oracle@Slave1Hadoop51 ~]$ ls -ltr /u01/oracle/11G/dbs/0vpua7f7_1_1ls: /u01/oracle/11G/dbs/0vpua7f7_1_1: No such file or directory[oracle@Slave1Hadoop51 ~]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 3 00:12:31 2015Copyright (c) 1982, 2005, Oracle.  All rights reserved.connected to target database: DB01 (DBID=1467107934)RMAN> crosscheck backupset of tablespace users;--crosscheck backupset device type disk;初步判断是范围大小的差别,显然前者更精确。using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=139 devtype=DISKcrosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0cpua34n_1_1 recid=12 stamp=870648983crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0tpua572_1_1 recid=29 stamp=870651106crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0upua7c3_1_1 recid=30 stamp=870653315crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0vpua7f7_1_1 recid=31 stamp=870653415Crosschecked 4 objectsRMAN> report need backup redundancy 1 tablespace users;Report of files with less than 1 redundant backupsFile #bkps Name---- ----- -----------------------------------------------------4    0     /u01/oracle/oradata/db01/users01.dbfRMAN> list backupset of tablespace users;List of Backup Sets===================BS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------12      Full    7.46M      DISK        00:00:01     02-FEB-15              BP Key: 12   Status: EXPIRED  Compressed: NO  Tag: TAG20150202T225623        Piece Name: /u01/oracle/11G/dbs/0cpua34n_1_1  List of Datafiles in backup set 12  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1351974    02-FEB-15 /u01/oracle/oradata/db01/users01.dbfBS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------29      Full    7.46M      DISK        00:00:00     02-FEB-15              BP Key: 29   Status: EXPIRED  Compressed: NO  Tag: TAG20150202T233146        Piece Name: /u01/oracle/11G/dbs/0tpua572_1_1  List of Datafiles in backup set 29  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1353085    02-FEB-15 /u01/oracle/oradata/db01/users01.dbfBS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------30      Full    7.46M      DISK        00:00:01     03-FEB-15              BP Key: 30   Status: EXPIRED  Compressed: NO  Tag: TAG20150203T000835        Piece Name: /u01/oracle/11G/dbs/0upua7c3_1_1  List of Datafiles in backup set 30  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1354181    03-FEB-15 /u01/oracle/oradata/db01/users01.dbfBS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------31      Full    7.46M      DISK        00:00:01     03-FEB-15              BP Key: 31   Status: EXPIRED  Compressed: NO  Tag: TAG20150203T001015        Piece Name: /u01/oracle/11G/dbs/0vpua7f7_1_1  List of Datafiles in backup set 31  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1354253    03-FEB-15 /u01/oracle/oradata/db01/users01.dbfRMAN> 
4个过期的备份文件。

RMAN> crosscheck backupset of tablespace users;using channel ORA_DISK_1crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0cpua34n_1_1 recid=12 stamp=870648983crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0tpua572_1_1 recid=29 stamp=870651106crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0upua7c3_1_1 recid=30 stamp=870653315crosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/0vpua7f7_1_1 recid=31 stamp=870653415Crosschecked 4 objectsRMAN> delete noprompt expired backup; using channel ORA_DISK_1List of Backup PiecesBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name------- ------- --- --- ----------- ----------- ----------12      12      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0cpua34n_1_113      13      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0epua3na_1_114      14      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0dpua3na_1_115      15      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0fpua3ne_1_116      16      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0gpua3nr_1_117      17      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0hpua3nr_1_118      18      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0ipua3o2_1_119      19      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0jpua3u1_1_120      20      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0kpua3u1_1_121      21      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0lpua3u3_1_122      22      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0npua47r_1_123      23      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0mpua47r_1_124      24      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0opua47v_1_125      25      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0ppua4fs_1_126      26      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0qpua4fu_1_127      27      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0rpua4g1_1_128      28      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0spua4g3_1_129      29      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0tpua572_1_130      30      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0upua7c3_1_131      31      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/0vpua7f7_1_1deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0cpua34n_1_1 recid=12 stamp=870648983deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0epua3na_1_1 recid=13 stamp=870649579deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0dpua3na_1_1 recid=14 stamp=870649579deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0fpua3ne_1_1 recid=15 stamp=870649583deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0gpua3nr_1_1 recid=16 stamp=870649595deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0hpua3nr_1_1 recid=17 stamp=870649595deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0ipua3o2_1_1 recid=18 stamp=870649603deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0jpua3u1_1_1 recid=19 stamp=870649794deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0kpua3u1_1_1 recid=20 stamp=870649794deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0lpua3u3_1_1 recid=21 stamp=870649795deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0npua47r_1_1 recid=22 stamp=870650108deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0mpua47r_1_1 recid=23 stamp=870650108deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0opua47v_1_1 recid=24 stamp=870650112deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0ppua4fs_1_1 recid=25 stamp=870650365deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0qpua4fu_1_1 recid=26 stamp=870650367deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0rpua4g1_1_1 recid=27 stamp=870650370deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0spua4g3_1_1 recid=28 stamp=870650372deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0tpua572_1_1 recid=29 stamp=870651106deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0upua7c3_1_1 recid=30 stamp=870653315deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/0vpua7f7_1_1 recid=31 stamp=870653415Deleted 20 EXPIRED objectsRMAN> crosscheck backupset of tablespace users;using channel ORA_DISK_1RMAN> 
再次演示:
RMAN> RMAN> RMAN> RMAN> backup tablespace users;Starting backup at 03-FEB-15using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backupsetchannel ORA_DISK_1: specifying datafile(s) in backupsetinput datafile fno=00004 name=/u01/oracle/oradata/db01/users01.dbfchannel ORA_DISK_1: starting piece 1 at 03-FEB-15channel ORA_DISK_1: finished piece 1 at 03-FEB-15piece handle=/u01/oracle/11G/dbs/10pua8b8_1_1 tag=TAG20150203T002512 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-FEB-15RMAN> list backup of tablespace users;List of Backup Sets===================BS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------32      Full    7.46M      DISK        00:00:01     03-FEB-15              BP Key: 32   Status: AVAILABLE  Compressed: NO  Tag: TAG20150203T002512        Piece Name: /u01/oracle/11G/dbs/10pua8b8_1_1  List of Datafiles in backup set 32  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1354709    03-FEB-15 /u01/oracle/oradata/db01/users01.dbfRMAN> exitRecovery Manager complete.[oracle@Slave1Hadoop51 ~]$ ls -ltr /u01/oracle/11G/dbs/10pua8b8_1_1ls: /u01/oracle/11G/dbs/10pua8b8_1_1: No such file or directory[oracle@Slave1Hadoop51 ~]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 3 00:26:17 2015Copyright (c) 1982, 2005, Oracle.  All rights reserved.connected to target database: DB01 (DBID=1467107934)RMAN> report need backup redundancy 1 tablespace users;using target database control file instead of recovery catalogReport of files with less than 1 redundant backupsFile #bkps Name---- ----- -----------------------------------------------------RMAN> crosscheck backupset of tablespace users;allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=126 devtype=DISKcrosschecked backup piece: found to be 'EXPIRED'backup piece handle=/u01/oracle/11G/dbs/10pua8b8_1_1 recid=32 stamp=870654312Crosschecked 1 objectsRMAN> report need backup redundancy 1 tablespace users;Report of files with less than 1 redundant backupsFile #bkps Name---- ----- -----------------------------------------------------4    0     /u01/oracle/oradata/db01/users01.dbfRMAN> list backup of tablespace users;List of Backup Sets===================BS Key  Type LV Size       Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------32      Full    7.46M      DISK        00:00:01     03-FEB-15              BP Key: 32   Status: EXPIRED  Compressed: NO  Tag: TAG20150203T002512        Piece Name: /u01/oracle/11G/dbs/10pua8b8_1_1  List of Datafiles in backup set 32  File LV Type Ckp SCN    Ckp Time  Name  ---- -- ---- ---------- --------- ----  4       Full 1354709    03-FEB-15 /u01/oracle/oradata/db01/users01.dbfRMAN> delete noprompt expired backup of  tablespace users;using channel ORA_DISK_1List of Backup PiecesBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name------- ------- --- --- ----------- ----------- ----------32      32      1   1   EXPIRED     DISK        /u01/oracle/11G/dbs/10pua8b8_1_1deleted backup piecebackup piece handle=/u01/oracle/11G/dbs/10pua8b8_1_1 recid=32 stamp=870654312Deleted 1 EXPIRED objectsRMAN> list backup of tablespace users;RMAN> 



0 0
原创粉丝点击