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证明),下次备份就不会重复备份。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值