日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

rman备份指定备份集对应文件

發布時間:2023/12/14 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 rman备份指定备份集对应文件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

例如備份user表空間,指定備份集對應文件

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on 9 10:32:05 2021

Copyright (c) 1982, 2013, Oracle. ?All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set line 160
SQL> set wrap off
SQL> select file_id,file_name from dba_data_files where tablespace_name='JYC';

? ?FILE_ID FILE_NAME
---------- -----------------------------------------------------------------------------------------------------------------------------------------------------
? ? ? ? ?5 /oracle/oradata/pri/jyc.dbf
? ? ? ? ?7 /oracle/oradata/pri/jyc2.dbf
? ? ? ? ?8 /oracle/oradata/pri/jyc3.dbf
? ? ? ? ?9 /oracle/oradata/pri/jyc4.dbf
? ? ? ? 10 /oracle/oradata/pri/jyc5.dbf
? ? ? ? 11 /oracle/oradata/pri/jyc6.dbf
? ? ? ? 12 /oracle/oradata/pri/jyc7.dbf
? ? ? ? 13 /oracle/oradata/pri/jyc8.dbf

8 rows selected.

SQL>?

0級備份指定備份集數據文件

注意:datafile只能用逗,號隔開,不可以用中橫杠-這種方式。備份路徑必須在通道后指定,否則會備份到$ORACLE_HOME/dbs下。

錯誤:

正確指定如下:(可惜發現備份了2次,去掉tablespace JYC則正常)

run { allocate channel t1 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t2 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t3 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t4 type disk format '/home/oracle/rman/jyc0_%U'; backup as backupset incremental level=0 tablespace JYC datafile 5,7,8 channel t1 tag=jyc0 datafile 9,10 channel t2 tag=jyc0 datafile 11,12 channel t3 tag=jyc0 datafile 13 channel t4 tag=jyc0; }

RMAN> run {
2> allocate channel t1 type disk format '/home/oracle/rman/jyc0_%U';
3> allocate channel t2 type disk format '/home/oracle/rman/jyc0_%U';
4> allocate channel t3 type disk format '/home/oracle/rman/jyc0_%U';
5> allocate channel t4 type disk format '/home/oracle/rman/jyc0_%U';
6> backup as backupset incremental level=0 tablespace JYC
7> datafile 5,7,8 channel t1 tag=jyc0
8> datafile 9,10 channel t2 tag=jyc0
9> datafile 11,12 channel t3 tag=jyc0
10> datafile 13 channel t4 tag=jyc0;
11> }

allocated channel: t1
channel t1: SID=171 device type=DISK

allocated channel: t2
channel t2: SID=254 device type=DISK

allocated channel: t3
channel t3: SID=89 device type=DISK

allocated channel: t4
channel t4: SID=249 device type=DISK

Starting backup at 19-321
channel t1: starting incremental level 0 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
channel t1: starting piece 1 at 19-321
channel t2: starting incremental level 0 datafile backup set
channel t2: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t2: starting piece 1 at 19-321
channel t3: starting incremental level 0 datafile backup set
channel t3: specifying datafile(s) in backup set
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
channel t3: starting piece 1 at 19-321
channel t4: starting incremental level 0 datafile backup set
channel t4: specifying datafile(s) in backup set
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
channel t4: starting piece 1 at 19-321
channel t1: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_1rvq4e8v_1_1 tag=JYC0 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:00
channel t1: starting incremental level 0 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
channel t1: starting piece 1 at 19-321
channel t2: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_1svq4e8v_1_1 tag=TAG20210319T102743 comment=NONE
channel t2: backup set complete, elapsed time: 00:00:00
channel t2: starting incremental level 0 datafile backup set
channel t2: specifying datafile(s) in backup set
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
channel t2: starting piece 1 at 19-321
channel t1: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_1vvq4e8v_1_1 tag=TAG20210319T102743 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:00
channel t3: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_1tvq4e8v_1_1 tag=TAG20210319T102743 comment=NONE
channel t3: backup set complete, elapsed time: 00:00:00
channel t3: starting incremental level 0 datafile backup set
channel t3: specifying datafile(s) in backup set
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
channel t3: starting piece 1 at 19-321
channel t4: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_1uvq4e8v_1_1 tag=TAG20210319T102743 comment=NONE
channel t4: backup set complete, elapsed time: 00:00:00
channel t4: starting incremental level 0 datafile backup set
channel t4: specifying datafile(s) in backup set
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t4: starting piece 1 at 19-321
channel t2: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_20vq4e8v_1_1 tag=JYC0 comment=NONE
channel t2: backup set complete, elapsed time: 00:00:00
channel t3: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_21vq4e8v_1_1 tag=JYC0 comment=NONE
channel t3: backup set complete, elapsed time: 00:00:00
channel t4: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_22vq4e8v_1_1 tag=JYC0 comment=NONE
channel t4: backup set complete, elapsed time: 00:00:01
Finished backup at 19-321
released channel: t1
released channel: t2
released channel: t3
released channel: t4

RMAN> list backup tag=jyc0;


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


BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
37 ? ? ?Incr 0 ?1.17M ? ? ?DISK ? ? ? ?00:00:00 ? ? 19-321 ? ??
? ? ? ? BP Key: 37 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC0
? ? ? ? Piece Name: /home/oracle/rman/jyc0_1rvq4e8v_1_1
? List of Datafiles in backup set 37
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 5 ? ?0 ?Incr 1063259 ? ?19-321 /oracle/oradata/pri/jyc.dbf
? 7 ? ?0 ?Incr 1063259 ? ?19-321 /oracle/oradata/pri/jyc2.dbf
? 8 ? ?0 ?Incr 1063259 ? ?19-321 /oracle/oradata/pri/jyc3.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
42 ? ? ?Incr 0 ?168.00K ? ?DISK ? ? ? ?00:00:00 ? ? 19-321 ? ??
? ? ? ? BP Key: 42 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC0
? ? ? ? Piece Name: /home/oracle/rman/jyc0_20vq4e8v_1_1
? List of Datafiles in backup set 42
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 9 ? ?0 ?Incr 1063264 ? ?19-321 /oracle/oradata/pri/jyc4.dbf
? 10 ? 0 ?Incr 1063264 ? ?19-321 /oracle/oradata/pri/jyc5.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
43 ? ? ?Incr 0 ?168.00K ? ?DISK ? ? ? ?00:00:00 ? ? 19-321 ? ??
? ? ? ? BP Key: 43 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC0
? ? ? ? Piece Name: /home/oracle/rman/jyc0_21vq4e8v_1_1
? List of Datafiles in backup set 43
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 11 ? 0 ?Incr 1063265 ? ?19-321 /oracle/oradata/pri/jyc6.dbf
? 12 ? 0 ?Incr 1063265 ? ?19-321 /oracle/oradata/pri/jyc7.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
44 ? ? ?Incr 0 ?96.00K ? ? DISK ? ? ? ?00:00:00 ? ? 19-321 ? ??
? ? ? ? BP Key: 44 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC0
? ? ? ? Piece Name: /home/oracle/rman/jyc0_22vq4e8v_1_1
? List of Datafiles in backup set 44
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 13 ? 0 ?Incr 1063266 ? ?19-321 /oracle/oradata/pri/jyc8.dbf

?

不指定備份集對應數據文件的話是正常的。但這不是我想要的。

run { allocate channel t1 type disk; allocate channel t2 type disk; allocate channel t3 type disk; allocate channel t4 type disk; backup as backupset incremental level=0 tablespace JYC format '/home/oracle/rman/jyc0_%U' tag=jyc0; }


RMAN> run {
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> backup as backupset incremental level=0 tablespace JYC format '/home/oracle/rman/jyc0_%U' tag=jyc0;
7> }

allocated channel: t1
channel t1: SID=88 device type=DISK

allocated channel: t2
channel t2: SID=255 device type=DISK

allocated channel: t3
channel t3: SID=9 device type=DISK

allocated channel: t4
channel t4: SID=87 device type=DISK

Starting backup at 19-321
channel t1: starting incremental level 0 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t1: starting piece 1 at 19-321
channel t2: starting incremental level 0 datafile backup set
channel t2: specifying datafile(s) in backup set
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
channel t2: starting piece 1 at 19-321
channel t3: starting incremental level 0 datafile backup set
channel t3: specifying datafile(s) in backup set
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
channel t3: starting piece 1 at 19-321
channel t4: starting incremental level 0 datafile backup set
channel t4: specifying datafile(s) in backup set
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
channel t4: starting piece 1 at 19-321
channel t1: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_4cvq5fdk_1_1 tag=JYC0 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:00
channel t2: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_4dvq5fdk_1_1 tag=JYC0 comment=NONE
channel t2: backup set complete, elapsed time: 00:00:00
channel t3: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_4evq5fdk_1_1 tag=JYC0 comment=NONE
channel t3: backup set complete, elapsed time: 00:00:00
channel t4: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc0_4fvq5fdk_1_1 tag=JYC0 comment=NONE
channel t4: backup set complete, elapsed time: 00:00:00
Finished backup at 19-321
released channel: t1
released channel: t2
released channel: t3
released channel: t4

去掉tablespace JYC則正常:

run { allocate channel t1 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t2 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t3 type disk format '/home/oracle/rman/jyc0_%U'; allocate channel t4 type disk format '/home/oracle/rman/jyc0_%U'; backup as backupset incremental level=0 datafile 5,7,8 channel t1 tag=jyc0 datafile 9,10 channel t2 tag=jyc0 datafile 11,12 channel t3 tag=jyc0 datafile 13 channel t4 tag=jyc0; }

RMAN> run {
2> allocate channel t1 type disk format '/home/oracle/rman/jyc0_%U';
3> allocate channel t2 type disk format '/home/oracle/rman/jyc0_%U';
4> allocate channel t3 type disk format '/home/oracle/rman/jyc0_%U';
5> allocate channel t4 type disk format '/home/oracle/rman/jyc0_%U';
6> backup as backupset incremental level=0
7> datafile 5,7,8 channel t1 tag=jyc0
8> datafile 9,10 channel t2 tag=jyc0
9> datafile 11,12 channel t3 tag=jyc0
10> datafile 13 channel t4 tag=jyc0;
11> }

allocated channel: t1
channel t1: SID=87 device type=DISK

allocated channel: t2
channel t2: SID=172 device type=DISK

allocated channel: t3
channel t3: SID=253 device type=DISK

allocated channel: t4
channel t4: SID=89 device type=DISK

Starting backup at 22-321
channel t1: starting incremental level 0 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
channel t1: starting piece 1 at 22-321
channel t2: starting incremental level 0 datafile backup set
channel t2: specifying datafile(s) in backup set
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
channel t2: starting piece 1 at 22-321
channel t3: starting incremental level 0 datafile backup set
channel t3: specifying datafile(s) in backup set
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
channel t3: starting piece 1 at 22-321
channel t4: starting incremental level 0 datafile backup set
channel t4: specifying datafile(s) in backup set
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t4: starting piece 1 at 22-321
channel t1: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4kvqcab9_1_1 tag=JYC0 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:00
channel t2: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4lvqcab9_1_1 tag=JYC0 comment=NONE
channel t2: backup set complete, elapsed time: 00:00:00
channel t3: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4mvqcab9_1_1 tag=JYC0 comment=NONE
channel t3: backup set complete, elapsed time: 00:00:00
channel t4: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4nvqcab9_1_1 tag=JYC0 comment=NONE
channel t4: backup set complete, elapsed time: 00:00:00
Finished backup at 22-321
released channel: t1
released channel: t2
released channel: t3
released channel: t4

或者:

run { allocate channel t1 type disk; allocate channel t2 type disk; allocate channel t3 type disk; allocate channel t4 type disk; backup as backupset incremental level=0 format '/home/oracle/rman/jyc0_%U' datafile 5,7,8 channel t1 tag=jyc00 datafile 9,10 channel t2 tag=jyc00 datafile 11,12 channel t3 tag=jyc00 datafile 13 channel t4 tag=jyc00; }

RMAN> run {
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> backup as backupset incremental level=0 format '/home/oracle/rman/jyc0_%U'
7> datafile 5,7,8 channel t1 tag=jyc00
8> datafile 9,10 channel t2 tag=jyc00
9> datafile 11,12 channel t3 tag=jyc00
10> datafile 13 channel t4 tag=jyc00;
11> }

allocated channel: t1
channel t1: SID=87 device type=DISK

allocated channel: t2
channel t2: SID=172 device type=DISK

allocated channel: t3
channel t3: SID=253 device type=DISK

allocated channel: t4
channel t4: SID=89 device type=DISK

Starting backup at 22-321
channel t1: starting incremental level 0 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
channel t1: starting piece 1 at 22-321
channel t2: starting incremental level 0 datafile backup set
channel t2: specifying datafile(s) in backup set
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
channel t2: starting piece 1 at 22-321
channel t3: starting incremental level 0 datafile backup set
channel t3: specifying datafile(s) in backup set
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
channel t3: starting piece 1 at 22-321
channel t4: starting incremental level 0 datafile backup set
channel t4: specifying datafile(s) in backup set
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t4: starting piece 1 at 22-321
channel t1: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4ovqcm2u_1_1 tag=JYC00 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:00
channel t2: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4pvqcm2u_1_1 tag=JYC00 comment=NONE
channel t2: backup set complete, elapsed time: 00:00:00
channel t3: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4qvqcm2u_1_1 tag=JYC00 comment=NONE
channel t3: backup set complete, elapsed time: 00:00:01
channel t4: finished piece 1 at 22-321
piece handle=/home/oracle/rman/jyc0_4rvqcm2u_1_1 tag=JYC00 comment=NONE
channel t4: backup set complete, elapsed time: 00:00:01
Finished backup at 22-321
released channel: t1
released channel: t2
released channel: t3
released channel: t4

RMAN> list backup tag=jyc00; ??


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


BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
129 ? ? Incr 0 ?1.17M ? ? ?DISK ? ? ? ?00:00:00 ? ? 22-321 ? ??
? ? ? ? BP Key: 129 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC00
? ? ? ? Piece Name: /home/oracle/rman/jyc0_4ovqcm2u_1_1
? List of Datafiles in backup set 129
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 5 ? ?0 ?Incr 1167438 ? ?22-321 /oracle/oradata/pri/jyc.dbf
? 7 ? ?0 ?Incr 1167438 ? ?22-321 /oracle/oradata/pri/jyc2.dbf
? 8 ? ?0 ?Incr 1167438 ? ?22-321 /oracle/oradata/pri/jyc3.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
130 ? ? Incr 0 ?168.00K ? ?DISK ? ? ? ?00:00:00 ? ? 22-321 ? ??
? ? ? ? BP Key: 130 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC00
? ? ? ? Piece Name: /home/oracle/rman/jyc0_4pvqcm2u_1_1
? List of Datafiles in backup set 130
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 9 ? ?0 ?Incr 1167439 ? ?22-321 /oracle/oradata/pri/jyc4.dbf
? 10 ? 0 ?Incr 1167439 ? ?22-321 /oracle/oradata/pri/jyc5.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
131 ? ? Incr 0 ?168.00K ? ?DISK ? ? ? ?00:00:00 ? ? 22-321 ? ??
? ? ? ? BP Key: 131 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC00
? ? ? ? Piece Name: /home/oracle/rman/jyc0_4qvqcm2u_1_1
? List of Datafiles in backup set 131
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 11 ? 0 ?Incr 1167440 ? ?22-321 /oracle/oradata/pri/jyc6.dbf
? 12 ? 0 ?Incr 1167440 ? ?22-321 /oracle/oradata/pri/jyc7.dbf

BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
132 ? ? Incr 0 ?96.00K ? ? DISK ? ? ? ?00:00:00 ? ? 22-321 ? ??
? ? ? ? BP Key: 132 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC00
? ? ? ? Piece Name: /home/oracle/rman/jyc0_4rvqcm2u_1_1
? List of Datafiles in backup set 132
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 13 ? 0 ?Incr 1167441 ? ?22-321 /oracle/oradata/pri/jyc8.dbf

RMAN>?

?

1級增量備份:文件放在一個備份集里。

run { allocate channel t1 type disk; backup incremental level=1 tablespace JYC filesperset 200 format '/home/oracle/rman/jyc1_%U' tag=jyc1; release channel t1; }

RMAN> run { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
2> allocate channel t1 type disk; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
3> backup incremental level=1 tablespace JYC filesperset 200 format '/home/oracle/rman/jyc1_%U' tag=jyc1;
4> release channel t1; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
5> } ?

using target database control file instead of recovery catalog
allocated channel: t1
channel t1: SID=249 device type=DISK

Starting backup at 19-321
channel t1: starting incremental level 1 datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00005 name=/oracle/oradata/pri/jyc.dbf
input datafile file number=00007 name=/oracle/oradata/pri/jyc2.dbf
input datafile file number=00008 name=/oracle/oradata/pri/jyc3.dbf
input datafile file number=00009 name=/oracle/oradata/pri/jyc4.dbf
input datafile file number=00010 name=/oracle/oradata/pri/jyc5.dbf
input datafile file number=00011 name=/oracle/oradata/pri/jyc6.dbf
input datafile file number=00012 name=/oracle/oradata/pri/jyc7.dbf
input datafile file number=00013 name=/oracle/oradata/pri/jyc8.dbf
channel t1: starting piece 1 at 19-321
channel t1: finished piece 1 at 19-321
piece handle=/home/oracle/rman/jyc1_23vq4f82_1_1 tag=JYC1 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-321

released channel: t1

RMAN> list backup tag=jyc1;


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


BS Key ?Type LV Size ? ? ? Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
45 ? ? ?Incr 1 ?88.00K ? ? DISK ? ? ? ?00:00:00 ? ? 19-321 ? ??
? ? ? ? BP Key: 45 ? Status: AVAILABLE ?Compressed: NO ?Tag: JYC1
? ? ? ? Piece Name: /home/oracle/rman/jyc1_23vq4f82_1_1
? List of Datafiles in backup set 45
? File LV Type Ckp SCN ? ?Ckp Time ? Name
? ---- -- ---- ---------- ---------- ----
? 5 ? ?1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc.dbf
? 7 ? ?1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc2.dbf
? 8 ? ?1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc3.dbf
? 9 ? ?1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc4.dbf
? 10 ? 1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc5.dbf
? 11 ? 1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc6.dbf
? 12 ? 1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc7.dbf
? 13 ? 1 ?Incr 1064757 ? ?19-321 /oracle/oradata/pri/jyc8.dbf

RMAN>?

相關參考:

http://www.itpub.net/thread-2141161-1-1.html

總結

以上是生活随笔為你收集整理的rman备份指定备份集对应文件的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。