2009년 8월 11일 화요일

Cross Check

▣ Cross Check

실제 파일과 backup Repository 간 비교함

=>  backup Repository를 update 함(expired)

     =>delete expired backup 하면 실제 파일이 없는 backup set은 Repository에서 삭제 됨.

   

RMAN> backup as backupset format '/disk2/exampleTs%f' tablespace example;

[oracle@orcl ~]$ cd /disk2/

[oracle@orcl disk2]$ ls

ORCL  backup  exampleTs5

[oracle@orcl disk2]$ rm exampleTs5

RMAN> crosscheck backupset;

RMAN> list backup of tablespace example;

      BS Key  Type LV Size       Device Type Elapsed Time Completion Time

  ------- ---- -- ---------- ----------- ------------ ---------------

 10      Full    56.37M     DISK        00:00:05     18-JUN-09

        BP Key: 10   Status: EXPIRED  Compressed: NO  Tag: TAG20090618T150521

        Piece Name: /disk2/exampleTs5

  List of Datafiles in backup set 10

  File LV Type Ckp SCN    Ckp Time  Name

  ---- -- ---- ---------- --------- ----

  5       Full 6815602    18-JUN-09 /u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_53mhtyt7_.dbf

    

RMAN> delete expired backup;

using channel ORA_DISK_1

List of Backup Pieces

BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name

------- ------- --- --- ----------- ----------- ----------

10      10      1   1   EXPIRED     DISK        /disk2/exampleTs5

Do you really want to delete the above objects (enter YES or NO)? YES

deleted backup piece

backup piece handle=/disk2/exampleTs5 recid=10 stamp=689871921

Deleted 1 EXPIRED objects

RMAN> list backupset 10;    =>    10번 이외의 recid backupset은 남아 있다.

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of list command at 06/18/2009 15:11:42

RMAN-06160: no backup pieces found for backup set key: 10

댓글 없음:

댓글 쓰기