fishcat论 RMAN备份中加filesperset的重要性续

fishcat论 RMAN备份中加filesperset的重要性续

上篇实验留下了疑问:到底是input到备份集中的所有文件备份完成了,下次备份就不用重复备份,
还是因为DELETE INPUT把备份过的文件删除了,下次备份就不用重复备份呢?

今天为了证明,实验如下:

RMAN> run{
2> BACKUP FILESPERSET 2
3> FORMAT '/backup/arch_%T_%s_%p'
4> ARCHIVELOG ALL;
5> }

Starting backup at 07-JAN-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=45 recid=56 stamp=803342776
input archive log thread=1 sequence=46 recid=57 stamp=803425515
channel ORA_DISK_1: starting piece 1 at 07-JAN-13
channel ORA_DISK_1: finished piece 1 at 07-JAN-13
piece handle=/backup/arch_20130107_80_1 tag=TAG20130107T053134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=50 recid=61 stamp=803968227
input archive log thread=1 sequence=51 recid=62 stamp=803969590
channel ORA_DISK_1: starting piece 1 at 07-JAN-13
c
user interrupt received
Finished backup at 07-JAN-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03099: job cancelled at user request

RMAN> run{
2> BACKUP FILESPERSET 2
3> FORMAT '/backup/arch_%T_%s_%p'
4> ARCHIVELOG ALL;
5> }

Starting backup at 07-JAN-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=45 recid=56 stamp=803342776
input archive log thread=1 sequence=46 recid=57 stamp=803425515
channel ORA_DISK_1: starting piece 1 at 07-JAN-13
channel ORA_DISK_1: finished piece 1 at 07-JAN-13
piece handle=/backup/arch_20130107_82_1 tag=TAG20130107T053326 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=50 recid=61 stamp=803968227
input archive log thread=1 sequence=51 recid=62 stamp=803969590
channel ORA_DISK_1: starting piece 1 at 07-JAN-13
channel ORA_DISK_1: finished piece 1 at 07-JAN-13
piece handle=/backup/arch_20130107_83_1 tag=TAG20130107T053326 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=49 recid=60 stamp=803706266
channel ORA_DISK_1: starting piece 1 at 07-JAN-13

user interrupt received
Finished backup at 07-JAN-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03099: job cancelled at user request


从边看到sequence45,46,50,51已经完成备份,然而中断后我们继续备份,又开始备份45,46,50,51

list看一下备份情况


RMAN> list backup of archivelog all;
.................................

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
61      28.57M     DISK        00:00:05     07-JAN-13      
        BP Key: 57   Status: AVAILABLE  Compressed: NO  Tag: TAG20130107T053134
        Piece Name: /backup/arch_20130107_80_1

  List of Archived Logs in backup set 61
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    45      854175     26-DEC-12 874461     29-DEC-12
  1    46      874461     29-DEC-12 913135     30-DEC-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
62      20.34M     DISK        00:00:02     07-JAN-13      
        BP Key: 58   Status: AVAILABLE  Compressed: NO  Tag: TAG20130107T053134
        Piece Name: /backup/arch_20130107_81_1

  List of Archived Logs in backup set 62
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    50      1016793    03-JAN-13 1045991    06-JAN-13
  1    51      1045991    06-JAN-13 1049414    06-JAN-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
63      28.57M     DISK        00:00:02     07-JAN-13      
        BP Key: 59   Status: AVAILABLE  Compressed: NO  Tag: TAG20130107T053326
        Piece Name: /backup/arch_20130107_82_1

  List of Archived Logs in backup set 63
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    45      854175     26-DEC-12 874461     29-DEC-12
  1    46      874461     29-DEC-12 913135     30-DEC-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
64      20.34M     DISK        00:00:02     07-JAN-13      
        BP Key: 60   Status: AVAILABLE  Compressed: NO  Tag: TAG20130107T053326
        Piece Name: /backup/arch_20130107_83_1

  List of Archived Logs in backup set 64
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    50      1016793    03-JAN-13 1045991    06-JAN-13
  1    51      1045991    06-JAN-13 1049414    06-JAN-13


可以看到RMAN备份集中有两份45,46,50,51.

综上证明:是因为DELETE INPUT把备份过的文件删除了(事实上在delete input的时候rman把备份过的文件信息在信息库中删除了,可以用crosscheck archivelog证明),下次备份就不会重复备份。


标签: 暂无标签
fishcat

写了 55 篇文章,拥有财富 503,被 40 人关注

oracle爱好者
转播转播 分享分享 分享淘帖
回复

使用道具

游客 | 发表于 2013-1-16 13:27:25

233

楼主的文章是宣言书。。。


Millashahttp://blog.sina.com.cn/s/blog_61622f000100l384.html
回复

使用道具

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈