使用RMAN备份时应如何处置归档日志文件(2)

这次并没有报错并提示xxx归档找不到,而是直接就完成了备份,生成了备份集297,与在客户那里碰到的情况有出入

--备份完成后,查看生成的备份集

[oracle@ora10g ~]$ cd /u01/orabackup/backupsets/

[oracle@ora10g backupsets]$ ll -lrth

total 1.6G

......其他备份集(略)

-rw-r----- 1 oracle oinstall 606K Sep 24 12:00 ora10g-4175411955_20140924_859118422_297.arc

-rw-r----- 1 oracle oinstall 166M Sep 24 12:02 ora10g-4175411955_20140924_859118425_298.db

-rw-r----- 1 oracle oinstall 610K Sep 24 12:02 ora10g-4175411955_20140924_859118562_299.arc

-rw-r----- 1 oracle oinstall 7.3M Sep 24 12:02 ora10g-c-4175411955-20140924-01.ctl

 

可以看到,备份全部完成了,共生成了2个归档日志备份集(arc),1个数据库备份集(db)以及控制文件备份集(ctl),这里有个细节要注意,由于我在脚本中写入了%s参数,从上面生成备份集生成的时间以及顺序可以发现RMAN备份这样一个顺序:

1. 对现有可以备份的数据库归档日志文件做一个备份

2. 对数据库进行备份

3. 切换一下日志,对完成全库备份后的归档日志再做一个备份(即使你没有通过RMAN> sql "alter system archive log current";来手动切)

4. 对控制文件备份(包括spfile,生成在同一个备份集)

 

我们可以看一下详细的日志输出,来对这个顺序有更深刻的了解:

Starting backup at 24-914

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting compressed archive log backupset

channel ORA_DISK_1: specifying archive log(s) in backup set

input archive log thread=1 sequence=11 recid=216 stamp=859118422

channel ORA_DISK_1: starting piece 1 at 24-914

channel ORA_DISK_1: finished piece 1 at 24-914

piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20140924_859118422_297.arc tag=ARC_BAK comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 24-914

 

Starting backup at 24-914

using channel ORA_DISK_1

channel ORA_DISK_1: starting compressed full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=/u01/app/oracle/oradata/ora10g/system01.dbf

input datafile fno=00003 name=/u01/app/oracle/oradata/ora10g/sysaux01.dbf

input datafile fno=00002 name=/u01/app/oracle/oradata/ora10g/undotbs01.dbf

input datafile fno=00005 name=/u01/app/oracle/oradata/ora10g/example01.dbf

input datafile fno=00006 name=/u01/app/oracle/oradata/ora10g/zlm01.dbf

input datafile fno=00004 name=/u01/app/oracle/oradata/ora10g/users01.dbf

channel ORA_DISK_1: starting piece 1 at 24-914

channel ORA_DISK_1: finished piece 1 at 24-914

piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20140924_859118425_298.db tag=DB_BAK comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:16

Finished backup at 24-914

 

Starting backup at 24-914

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting compressed archive log backupset

channel ORA_DISK_1: specifying archive log(s) in backup set

input archive log thread=1 sequence=12 recid=217 stamp=859118561

channel ORA_DISK_1: starting piece 1 at 24-914

channel ORA_DISK_1: finished piece 1 at 24-914

piece handle=/u01/orabackup/backupsets/ora10g-4175411955_20140924_859118562_299.arc tag=ARC_BAK comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

Finished backup at 24-914

 

Starting Control File and SPFILE Autobackup at 24-914

piece handle=/u01/orabackup/backupsets/ora10g-c-4175411955-20140924-01.ctl comment=NONE

Finished Control File and SPFILE Autobackup at 24-914

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/25e0f6cb72728a2a03cdda5c32f540e7.html