RMAN> BACKUP   
2> FORMAT '/backup/arch_%T_%s_%p'
3> SKIP INACCESSIBLE
4> ARCHIVELOG ALL;

Starting backup at 08-JAN-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=67 RECID=1 STAMP=804194038
input archived log thread=1 sequence=68 RECID=2 STAMP=804194161
input archived log thread=1 sequence=69 RECID=3 STAMP=804194208
input archived log thread=1 sequence=70 RECID=4 STAMP=804194396
channel ORA_DISK_1: starting piece 1 at 08-JAN-13
channel ORA_DISK_1: finished piece 1 at 08-JAN-13
piece handle=/backup/arch_20130108_3_1 tag=TAG20130108T191956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-JAN-13

RMAN> BACKUP
2> FORMAT '/backup/arch_%T_%s_%p'
3> SKIP INACCESSIBLE
4> ARCHIVELOG ALL;

Starting backup at 08-JAN-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=67 RECID=1 STAMP=804194038
input archived log thread=1 sequence=68 RECID=2 STAMP=804194161
input archived log thread=1 sequence=69 RECID=3 STAMP=804194208
input archived log thread=1 sequence=70 RECID=4 STAMP=804194396
input archived log thread=1 sequence=71 RECID=5 STAMP=804194410
channel ORA_DISK_1: starting piece 1 at 08-JAN-13
channel ORA_DISK_1: finished piece 1 at 08-JAN-13
piece handle=/backup/arch_20130108_4_1 tag=TAG20130108T192010 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-JAN-13

RMAN>
标签: 暂无标签
fishcat

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

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

使用道具

P5 | 发表于 2013-1-8 16:17:53
备份过的居然会重复备份,这个似乎不合情理。
回复

使用道具

ike
P4 | 发表于 2013-1-8 19:41:54
这应该是合理的。
例如备份如果失败,或者保存备份的介质损害,要允许ORACLE重新备份归档日志吧?
回复

使用道具

P5 | 发表于 2013-1-9 13:17:59
备份失败当然可以再备,但是备份成功了的为何还要被,如果一直不加delete input那不是要备份很多次,
如果备份的介质都损坏了,还谈什么恢复,你备份再多次也没用
回复

使用道具

P6 | 发表于 2013-1-11 16:03:28
1、归档一定要用rman删除,因为这样控制文件中的归档元数据才会一致
2、归档需要手工的删除,否则每次备份的时候会全部备份,当然了,你也可以指定备份范围
具体见RMAN备份文档
回复

使用道具

P5 | 发表于 2013-1-19 11:34:11
CONFIGURE BACKUP OPTIMIZATION on; 可以让下次备份归档的时候跳过已经备过的
回复

使用道具

P5 | 发表于 2013-1-19 11:35:03
RMAN> run{
2> BACKUP
3> FORMAT '/backup/arch_%T_%s_%p'
4> SKIP INACCESSIBLE
5> ARCHIVELOG ALL;
6> }

Starting backup at 19-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=78 recid=89 stamp=805144989
input archive log thread=1 sequence=79 recid=90 stamp=805145189
input archive log thread=1 sequence=80 recid=91 stamp=805145192
input archive log thread=1 sequence=81 recid=92 stamp=805145207
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/arch_20130119_118_1 tag=TAG20130119T192647 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-JAN-13

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

Starting backup at 19-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=78 recid=89 stamp=805144989
input archive log thread=1 sequence=79 recid=90 stamp=805145189
input archive log thread=1 sequence=80 recid=91 stamp=805145192
input archive log thread=1 sequence=81 recid=92 stamp=805145207
input archive log thread=1 sequence=82 recid=93 stamp=805145238
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/arch_20130119_119_1 tag=TAG20130119T192718 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-JAN-13

RMAN> list backup
2> ;


List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
98      8.54M      DISK        00:00:01     19-JAN-13      
        BP Key: 94   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T192647
        Piece Name: /backup/arch_20130119_118_1

  List of Archived Logs in backup set 98
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      1154634    17-JAN-13 1175177    19-JAN-13
  1    79      1175177    19-JAN-13 1177220    19-JAN-13
  1    80      1177220    19-JAN-13 1177222    19-JAN-13
  1    81      1177222    19-JAN-13 1177234    19-JAN-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
99      8.54M      DISK        00:00:00     19-JAN-13      
        BP Key: 95   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T192718
        Piece Name: /backup/arch_20130119_119_1

  List of Archived Logs in backup set 99
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      1154634    17-JAN-13 1175177    19-JAN-13
  1    79      1175177    19-JAN-13 1177220    19-JAN-13
  1    80      1177220    19-JAN-13 1177222    19-JAN-13
  1    81      1177222    19-JAN-13 1177234    19-JAN-13
  1    82      1177234    19-JAN-13 1177250    19-JAN-13

RMAN> show all;

RMAN configuration parameters 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 ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/oracle/dbs/snapcf_s1.f'; # default

RMAN> CONFIGURE BACKUP OPTIMIZATION on;

new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored

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

Starting backup at 19-JAN-13
current log archived
using channel ORA_DISK_1
skipping archive log file /archive1/1_78_799111702.dbf; already backed up 2 time(s)
skipping archive log file /archive1/1_79_799111702.dbf; already backed up 2 time(s)
skipping archive log file /archive1/1_80_799111702.dbf; already backed up 2 time(s)
skipping archive log file /archive1/1_81_799111702.dbf; already backed up 2 time(s)
skipping archive log file /archive1/1_82_799111702.dbf; already backed up 1 time(s)
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=83 recid=94 stamp=805145287
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/arch_20130119_120_1 tag=TAG20130119T192807 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 19-JAN-13

RMAN> list backup;


List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
98      8.54M      DISK        00:00:01     19-JAN-13      
        BP Key: 94   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T192647
        Piece Name: /backup/arch_20130119_118_1

  List of Archived Logs in backup set 98
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      1154634    17-JAN-13 1175177    19-JAN-13
  1    79      1175177    19-JAN-13 1177220    19-JAN-13
  1    80      1177220    19-JAN-13 1177222    19-JAN-13
  1    81      1177222    19-JAN-13 1177234    19-JAN-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
99      8.54M      DISK        00:00:00     19-JAN-13      
        BP Key: 95   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T192718
        Piece Name: /backup/arch_20130119_119_1

  List of Archived Logs in backup set 99
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      1154634    17-JAN-13 1175177    19-JAN-13
  1    79      1175177    19-JAN-13 1177220    19-JAN-13
  1    80      1177220    19-JAN-13 1177222    19-JAN-13
  1    81      1177222    19-JAN-13 1177234    19-JAN-13
  1    82      1177234    19-JAN-13 1177250    19-JAN-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
100     10.50K     DISK        00:00:01     19-JAN-13      
        BP Key: 96   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T192807
        Piece Name: /backup/arch_20130119_120_1

  List of Archived Logs in backup set 100
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    83      1177250    19-JAN-13 1177296    19-JAN-13

RMAN>
回复

使用道具

P5 | 发表于 2013-1-19 11:47:23
对数据文件的备份则不会有影响
RMAN> run{
2> sql 'alter system archive log current';
3> backup database format '/backup/full_%T_%s_%p'
4> include current controlfile;
5> }

sql statement: alter system archive log current

Starting backup at 19-JAN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/home/oracle/oradata/s1/system01.dbf
input datafile fno=00003 name=/home/oracle/oradata/s1/sysaux01.dbf
input datafile fno=00002 name=/home/oracle/oradata/s1/undotbs01.dbf
input datafile fno=00005 name=/home/oracle/oradata/s1/example01.dbf
input datafile fno=00004 name=/home/oracle/oradata/s1/users01.dbf
input datafile fno=00008 name=/home/oracle/oradata/s1/tp01_01.dbf
input datafile fno=00009 name=/home/oracle/oradata/s1/tp02_01.dbf
input datafile fno=00010 name=/home/oracle/oradata/s1/tp03_01.dbf
input datafile fno=00011 name=/home/oracle/oradata/s1/tp04_01.dbf
input datafile fno=00006 name=/home/oracle/oradata/s1/vip01.dbf
input datafile fno=00007 name=/home/oracle/oradata/s1/test01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_121_1 tag=TAG20130119T193443 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:47
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_122_1 tag=TAG20130119T193443 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 19-JAN-13

RMAN> list backup of database;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
101     Full    916.38M    DISK        00:01:45     19-JAN-13      
        BP Key: 97   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T193443
        Piece Name: /backup/full_20130119_121_1
  List of Datafiles in backup set 101
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/system01.dbf
  2       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/undotbs01.dbf
  3       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/sysaux01.dbf
  4       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/users01.dbf
  5       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/example01.dbf
  6       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/vip01.dbf
  7       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/test01.dbf
  8       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp01_01.dbf
  9       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp02_01.dbf
  10      Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp03_01.dbf
  11      Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp04_01.dbf

RMAN> run{
2> sql 'alter system archive log current';
3> backup database format '/backup/full_%T_%s_%p'
4> include current controlfile;
5> }

sql statement: alter system archive log current

Starting backup at 19-JAN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/home/oracle/oradata/s1/system01.dbf
input datafile fno=00003 name=/home/oracle/oradata/s1/sysaux01.dbf
input datafile fno=00002 name=/home/oracle/oradata/s1/undotbs01.dbf
input datafile fno=00005 name=/home/oracle/oradata/s1/example01.dbf
input datafile fno=00004 name=/home/oracle/oradata/s1/users01.dbf
input datafile fno=00008 name=/home/oracle/oradata/s1/tp01_01.dbf
input datafile fno=00009 name=/home/oracle/oradata/s1/tp02_01.dbf
input datafile fno=00010 name=/home/oracle/oradata/s1/tp03_01.dbf
input datafile fno=00011 name=/home/oracle/oradata/s1/tp04_01.dbf
input datafile fno=00006 name=/home/oracle/oradata/s1/vip01.dbf
input datafile fno=00007 name=/home/oracle/oradata/s1/test01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_123_1 tag=TAG20130119T194153 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:46
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_124_1 tag=TAG20130119T194153 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 19-JAN-13

RMAN> list backup of database;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
101     Full    916.38M    DISK        00:01:45     19-JAN-13      
        BP Key: 97   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T193443
        Piece Name: /backup/full_20130119_121_1
  List of Datafiles in backup set 101
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/system01.dbf
  2       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/undotbs01.dbf
  3       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/sysaux01.dbf
  4       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/users01.dbf
  5       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/example01.dbf
  6       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/vip01.dbf
  7       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/test01.dbf
  8       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp01_01.dbf
  9       Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp02_01.dbf
  10      Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp03_01.dbf
  11      Full 1177519    19-JAN-13 /home/oracle/oradata/s1/tp04_01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
103     Full    916.38M    DISK        00:01:44     19-JAN-13      
        BP Key: 99   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T194153
        Piece Name: /backup/full_20130119_123_1
  List of Datafiles in backup set 103
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/system01.dbf
  2       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/undotbs01.dbf
  3       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/sysaux01.dbf
  4       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/users01.dbf
  5       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/example01.dbf
  6       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/vip01.dbf
  7       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/test01.dbf
  8       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/tp01_01.dbf
  9       Full 1178286    19-JAN-13 /home/oracle/oradata/s1/tp02_01.dbf
  10      Full 1178286    19-JAN-13 /home/oracle/oradata/s1/tp03_01.dbf
  11      Full 1178286    19-JAN-13 /home/oracle/oradata/s1/tp04_01.dbf
回复

使用道具

P5 | 发表于 2013-1-19 11:58:18
参数:BACKUP OPTIMIZATION备份优化设置为on后
如果备份的文件中没有变动而且又被备份过就会跳过这部分文件。理论上备份优化仅对于只读表空间或offline表空间起作用,但同时对于已经备份过的archivelog文件也会跳过不再备份
回复

使用道具

P5 | 发表于 2013-1-19 12:14:04
SQL> select tablespace_name,file_id from dba_data_files where tablespace_name='TEST';

TABLESPACE_NAME                   FILE_ID
------------------------------ ----------
TEST                                    7

SQL> alter tablespace test offline;

Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces where tablespace_name='TEST';

TABLESPACE_NAME                STATUS
------------------------------ ---------
TEST                           OFFLINE

RMAN> backup datafile 7 format '/backup/full_%T_%s_%p';

Starting backup at 19-JAN-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=145 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00007 name=/home/oracle/oradata/s1/test01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_127_1 tag=TAG20130119T200413 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-JAN-13

RMAN> backup datafile 7 format '/backup/full_%T_%s_%p';

Starting backup at 19-JAN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00007 name=/home/oracle/oradata/s1/test01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_128_1 tag=TAG20130119T200421 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-JAN-13

RMAN> list backup;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
107     Full    88.00K     DISK        00:00:01     19-JAN-13      
        BP Key: 103   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200413
        Piece Name: /backup/full_20130119_127_1
  List of Datafiles in backup set 107
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  7       Full 1178865    19-JAN-13 /home/oracle/oradata/s1/test01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
108     Full    88.00K     DISK        00:00:00     19-JAN-13      
        BP Key: 104   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200421
        Piece Name: /backup/full_20130119_128_1
  List of Datafiles in backup set 108
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  7       Full 1178865    19-JAN-13 /home/oracle/oradata/s1/test01.dbf

RMAN>

RMAN> run{
2> sql 'alter system archive log current';
3> backup database format '/backup/full_%T_%s_%p'
4> include current controlfile;
5> }

sql statement: alter system archive log current

Starting backup at 19-JAN-13
using channel ORA_DISK_1
skipping datafile 7; already backed up 2 time(s)
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/home/oracle/oradata/s1/system01.dbf
input datafile fno=00003 name=/home/oracle/oradata/s1/sysaux01.dbf
input datafile fno=00002 name=/home/oracle/oradata/s1/undotbs01.dbf
input datafile fno=00005 name=/home/oracle/oradata/s1/example01.dbf
input datafile fno=00004 name=/home/oracle/oradata/s1/users01.dbf
input datafile fno=00008 name=/home/oracle/oradata/s1/tp01_01.dbf
input datafile fno=00009 name=/home/oracle/oradata/s1/tp02_01.dbf
input datafile fno=00010 name=/home/oracle/oradata/s1/tp03_01.dbf
input datafile fno=00011 name=/home/oracle/oradata/s1/tp04_01.dbf
input datafile fno=00006 name=/home/oracle/oradata/s1/vip01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_129_1 tag=TAG20130119T200451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/backup/full_20130119_130_1 tag=TAG20130119T200451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 19-JAN-13

RMAN> list backup;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
107     Full    88.00K     DISK        00:00:01     19-JAN-13      
        BP Key: 103   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200413
        Piece Name: /backup/full_20130119_127_1
  List of Datafiles in backup set 107
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  7       Full 1178865    19-JAN-13 /home/oracle/oradata/s1/test01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
108     Full    88.00K     DISK        00:00:00     19-JAN-13      
        BP Key: 104   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200421
        Piece Name: /backup/full_20130119_128_1
  List of Datafiles in backup set 108
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  7       Full 1178865    19-JAN-13 /home/oracle/oradata/s1/test01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
109     Full    916.34M    DISK        00:01:38     19-JAN-13      
        BP Key: 105   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200451
        Piece Name: /backup/full_20130119_129_1
  List of Datafiles in backup set 109
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/system01.dbf
  2       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/undotbs01.dbf
  3       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/sysaux01.dbf
  4       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/users01.dbf
  5       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/example01.dbf
  6       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/vip01.dbf
  8       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/tp01_01.dbf
  9       Full 1179072    19-JAN-13 /home/oracle/oradata/s1/tp02_01.dbf
  10      Full 1179072    19-JAN-13 /home/oracle/oradata/s1/tp03_01.dbf
  11      Full 1179072    19-JAN-13 /home/oracle/oradata/s1/tp04_01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
110     Full    7.14M      DISK        00:00:01     19-JAN-13      
        BP Key: 106   Status: AVAILABLE  Compressed: NO  Tag: TAG20130119T200451
        Piece Name: /backup/full_20130119_130_1
  Control File Included: Ckp SCN: 1179099      Ckp time: 19-JAN-13

RMAN>


可以看出把test表空间offline后,对单独备份,还是会再次备份,而对全备则不会再次备份
回复

使用道具

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

本版积分规则

意见
反馈