Oracle磁帶備份模擬

abstractcyj發表於2020-04-03

RMAN> run {

allocate channel ch00 device type 'SBT_TAPE'

PARMS="SBT_LIBRARY=oracle.disksbt,

ENV=(BACKUP_DIR=/tmp)";

backup datafile 1 format='%U';

}2> 3> 4> 5> 6> 


allocated channel: ch00

channel ch00: SID=201 device type=SBT_TAPE

channel ch00: WARNING: Oracle Test Disk API


Starting backup at 03-APR-20

channel ch00: starting full datafile backup set

channel ch00: specifying datafile(s) in backup set

input datafile file number=00001 name=/oracle/app/oracle/oradata/orcl/system01.dbf

channel ch00: starting piece 1 at 03-APR-20

channel ch00: finished piece 1 at 03-APR-20

piece handle=14uso7sc_1_1 tag=TAG20200403T203316 comment=API Version 2.0,MMS Version 8.1.3.0

channel ch00: backup set complete, elapsed time: 00:00:25

channel ch00: starting full datafile backup set

channel ch00: specifying datafile(s) in backup set

including current control file in backup set

channel ch00: starting piece 1 at 03-APR-20

channel ch00: finished piece 1 at 03-APR-20

piece handle=15uso7t6_1_1 tag=TAG20200403T203316 comment=API Version 2.0,MMS Version 8.1.3.0

channel ch00: backup set complete, elapsed time: 00:00:01

Finished backup at 03-APR-20

released channel: ch00


RMAN> run {

allocate channel ch00 device type 'SBT_TAPE'

PARMS="SBT_LIBRARY=oracle.disksbt,

ENV=(BACKUP_DIR=/tmp)";

delete backup;

}2> 3> 4> 5> 6> 


allocated channel: ch00

channel ch00: SID=15 device type=SBT_TAPE

channel ch00: WARNING: Oracle Test Disk API



List of Backup Pieces

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

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

1       1       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_3:981880213:1>.dbf

2       2       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_2:981880213:1>.dbf

3       3       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_1:981880213:1>.dbf

4       4       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_5:981880298:1>.dbf

5       5       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_4:981880298:1>.dbf

6       6       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_7:981880303:1>.dbf

7       7       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_6:981880303:1>.dbf

8       8       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_8:981880307:1>.dbf

9       9       1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_15:981881499:1>.dbf

10      10      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_14:981881499:1>.dbf

11      11      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_16:981881499:1>.dbf

12      12      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_18:981881544:1>.dbf

13      13      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_17:981881544:1>.dbf

14      14      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_19:981881548:1>.dbf

15      15      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_20:981881548:1>.dbf

16      16      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_21:981881548:1>.dbf

17      17      1   1   AVAILABLE   SBT_TAPE    oracle_orcl_backup01<orcl_22:981881551:1>.dbf

33      33      1   1   AVAILABLE   SBT_TAPE    14uso7sc_1_1

34      34      1   1   AVAILABLE   SBT_TAPE    15uso7t6_1_1


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

deleted backup piece

backup piece handle=14uso7sc_1_1 RECID=33 STAMP=1036787596

deleted backup piece

backup piece handle=15uso7t6_1_1 RECID=34 STAMP=1036787647

Deleted 2 objects


RMAN-06207: WARNING: 17 objects could not be deleted for SBT_TAPE channel(s) due

RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status

RMAN-06210: List of Mismatched objects

RMAN-06211: ==========================

RMAN-06212:   Object Type   Filename/Handle

RMAN-06213: --------------- ---------------------------------------------------

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_3:981880213:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_2:981880213:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_1:981880213:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_5:981880298:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_4:981880298:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_7:981880303:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_6:981880303:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_8:981880307:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_15:981881499:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_14:981881499:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_16:981881499:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_18:981881544:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_17:981881544:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_19:981881548:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_20:981881548:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_21:981881548:1>.dbf

RMAN-06214: Backup Piece    oracle_orcl_backup01<orcl_22:981881551:1>.dbf


released channel: ch00


RMAN> run {

allocate channel ch00 device type 'SBT_TAPE'

PARMS="SBT_LIBRARY=oracle.disksbt,

ENV=(BACKUP_DIR=/tmp)";

crosscheck backup;

delete expired backup;

}

2> 3> 4> 5> 6> 7> 

allocated channel: ch00

channel ch00: SID=15 device type=SBT_TAPE

channel ch00: WARNING: Oracle Test Disk API


crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_3:981880213:1>.dbf RECID=1 STAMP=981880213

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_2:981880213:1>.dbf RECID=2 STAMP=981880213

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_1:981880213:1>.dbf RECID=3 STAMP=981880213

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_5:981880298:1>.dbf RECID=4 STAMP=981880298

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_4:981880298:1>.dbf RECID=5 STAMP=981880299

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_7:981880303:1>.dbf RECID=6 STAMP=981880303

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_6:981880303:1>.dbf RECID=7 STAMP=981880303

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_8:981880307:1>.dbf RECID=8 STAMP=981880308

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_15:981881499:1>.dbf RECID=9 STAMP=981881499

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_14:981881499:1>.dbf RECID=10 STAMP=981881499

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_16:981881499:1>.dbf RECID=11 STAMP=981881499

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_18:981881544:1>.dbf RECID=12 STAMP=981881544

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_17:981881544:1>.dbf RECID=13 STAMP=981881544

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_19:981881548:1>.dbf RECID=14 STAMP=981881548

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_20:981881548:1>.dbf RECID=15 STAMP=981881548

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_21:981881548:1>.dbf RECID=16 STAMP=981881548

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=oracle_orcl_backup01<orcl_22:981881551:1>.dbf RECID=17 STAMP=981881552

Crosschecked 17 objects




List of Backup Pieces

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

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

1       1       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_3:981880213:1>.dbf

2       2       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_2:981880213:1>.dbf

3       3       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_1:981880213:1>.dbf

4       4       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_5:981880298:1>.dbf

5       5       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_4:981880298:1>.dbf

6       6       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_7:981880303:1>.dbf

7       7       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_6:981880303:1>.dbf

8       8       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_8:981880307:1>.dbf

9       9       1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_15:981881499:1>.dbf

10      10      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_14:981881499:1>.dbf

11      11      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_16:981881499:1>.dbf

12      12      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_18:981881544:1>.dbf

13      13      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_17:981881544:1>.dbf

14      14      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_19:981881548:1>.dbf

15      15      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_20:981881548:1>.dbf

16      16      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_21:981881548:1>.dbf

17      17      1   1   EXPIRED     SBT_TAPE    oracle_orcl_backup01<orcl_22:981881551:1>.dbf


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

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_3:981880213:1>.dbf RECID=1 STAMP=981880213

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_2:981880213:1>.dbf RECID=2 STAMP=981880213

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_1:981880213:1>.dbf RECID=3 STAMP=981880213

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_5:981880298:1>.dbf RECID=4 STAMP=981880298

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_4:981880298:1>.dbf RECID=5 STAMP=981880299

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_7:981880303:1>.dbf RECID=6 STAMP=981880303

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_6:981880303:1>.dbf RECID=7 STAMP=981880303

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_8:981880307:1>.dbf RECID=8 STAMP=981880308

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_15:981881499:1>.dbf RECID=9 STAMP=981881499

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_14:981881499:1>.dbf RECID=10 STAMP=981881499

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_16:981881499:1>.dbf RECID=11 STAMP=981881499

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_18:981881544:1>.dbf RECID=12 STAMP=981881544

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_17:981881544:1>.dbf RECID=13 STAMP=981881544

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_19:981881548:1>.dbf RECID=14 STAMP=981881548

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_20:981881548:1>.dbf RECID=15 STAMP=981881548

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_21:981881548:1>.dbf RECID=16 STAMP=981881548

deleted backup piece

backup piece handle=oracle_orcl_backup01<orcl_22:981881551:1>.dbf RECID=17 STAMP=981881552

Deleted 17 EXPIRED objects


released channel: ch00


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2684337/,如需轉載,請註明出處,否則將追究法律責任。

相關文章