Heim >Datenbank >MySQL-Tutorial >使用RMAN备份时什么时候才会自动备份控制文件
Target DB / RMAN Client: 11.2.0.1.0 1. 当CONFIGURE CONTROLFILE AUTOBACKUP OFF;时,仅备份数据文件1(system01.dbf)时会自动
Target DB / RMAN Client: 11.2.0.1.0
1. 当CONFIGURE CONTROLFILE AUTOBACKUP OFF;时,,仅备份数据文件1(system01.dbf)时会自动备份控制文件;
2. 当CONFIGURE CONTROLFILE AUTOBACKUP ON;时,备份任意文件(数据文件/归档日志)都会自动备份控制文件。
RMAN> show all;
RMAN configuration parameters for database with db_unique_name T11A are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORA11G\ORASOFT\DATABASE\SNCFT11A.ORA'; # default
RMAN> backup datafile 1;
Starting backup at 05-JUN-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=D:\ORA11G\ORADATA\T11A\SYSTEM01.DBF
channel ORA_DISK_1: starting piece 1 at 05-JUN-12
channel ORA_DISK_1: finished piece 1 at 05-JUN-12
piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151702_7WVDMHGW_.BKP tag=TAG20120605T151702 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 05-JUN-12
channel ORA_DISK_1: finished piece 1 at 05-JUN-12
piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NCSNF_TAG20120605T151702_7WVDN1PN_.BKP tag=TAG20120605T151702 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-JUN-12
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 186.25M DISK 00:00:12 05-JUN-12
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20120605T151702
Piece Name: D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151702_7WVDMHGW_.BKP
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 664502 05-JUN-12 D:\ORA11G\ORADATA\T11A\SYSTEM01.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 9.36M DISK 00:00:04 05-JUN-12
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20120605T151702
Piece Name: D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NCSNF_TAG20120605T151702_7WVDN1PN_.BKP
SPFILE Included: Modification time: 05-JUN-12
SPFILE db_unique_name: T11A
Control File Included: Ckp SCN: 664507 Ckp time: 05-JUN-12
RMAN> delete backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
2 2 1 1 AVAILABLE DISK D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151702_7WVDMHGW_.BKP
3 3 1 1 AVAILABLE DISK D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NCSNF_TAG20120605T151702_7WVDN1PN_.BKP
Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151702_7WVDMHGW_.BKP RECID=2 STAMP=785171823
deleted backup piece
backup piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NCSNF_TAG20120605T151702_7WVDN1PN_.BKP RECID=3 STAMP=785171841
Deleted 2 objects
RMAN> backup datafile 2;
Starting backup at 05-JUN-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=D:\ORA11G\ORADATA\T11A\SYSAUX01.DBF
channel ORA_DISK_1: starting piece 1 at 05-JUN-12
channel ORA_DISK_1: finished piece 1 at 05-JUN-12
piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151753_7WVDO1TY_.BKP tag=TAG20120605T151753 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 05-JUN-12
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 132.41M DISK 00:00:08 05-JUN-12
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20120605T151753
Piece Name: D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151753_7WVDO1TY_.BKP
List of Datafiles in backup set 4
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
2 Full 664556 05-JUN-12 D:\ORA11G\ORADATA\T11A\SYSAUX01.DBF
RMAN> delete backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
4 4 1 1 AVAILABLE DISK D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151753_7WVDO1TY_.BKP
Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=D:\ORA11G\FLASH_RECOVERY_AREA\T11A\BACKUPSET\2012_06_05\O1_MF_NNNDF_TAG20120605T151753_7WVDO1TY_.BKP RECID=4 STAMP=785171873
Deleted 1 objects