備份集和備份片之間的關係

李行行丶發表於2022-03-18

備份集和備份片之間的關係
##備份片(backuppiece):表示一個rman備份產生的備份檔案,使用物理命令可以實實在在的看到
##備份集(backupset):表示進行一次被備份所產生的所有備份片集合,是一個邏輯概念
##指定每個備份片的最大大小,這樣一個備份集就可以產生多個備份片
RMAN> run{
2> allocate channel c1 device type disk maxpiecesize 500M to destination '/home/oracle/bak1/';
3> backup database;
4> }
released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=54 device type=DISK
Starting backup at 18-MAR-22
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/orcl/system01.dbf
input datafile file number=00003 name=/oradata/orcl/sysaux01.dbf
input datafile file number=00004 name=/oradata/orcl/undotbs01.dbf
input datafile file number=00005 name=/oradata/orcl/lhh02.dbf
input datafile file number=00002 name=/oradata/orcl/users02.dbf
input datafile file number=00007 name=/oradata/orcl/users01.dbf
channel c1: starting piece 1 at 18-MAR-22
channel c1: finished piece 1 at 18-MAR-22
piece handle=/home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t1554_.bkp tag=TAG20220318T100213 comment=NONE
channel c1: starting piece 2 at 18-MAR-22
channel c1: finished piece 2 at 18-MAR-22
piece handle=/home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t18kj_.bkp tag=TAG20220318T100213 comment=NONE
channel c1: starting piece 3 at 18-MAR-22
channel c1: finished piece 3 at 18-MAR-22
piece handle=/home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t1cm2_.bkp tag=TAG20220318T100213 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
Finished backup at 18-MAR-22
Starting Control File and SPFILE Autobackup at 18-MAR-22
piece handle=/home/oracle/fra/ORCL/autobackup/2022_03_18/o1_mf_s_1099648940_k37t1dyt_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 18-MAR-22
released channel: c1
##這裡產生了兩個備份集(BS:52和BS:53),四個備份片,因為引數檔案、控制檔案和資料檔案不屬於同一型別的資料,所以單獨一個備份集
RMAN> list backupset;
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
52      Full    1.06G      DISK        00:00:06     18-MAR-22      
  List of Datafiles in backup set 52
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 3224162    18-MAR-22              NO    /oradata/orcl/system01.dbf
  2       Full 3224162    18-MAR-22              NO    /oradata/orcl/users02.dbf
  3       Full 3224162    18-MAR-22              NO    /oradata/orcl/sysaux01.dbf
  4       Full 3224162    18-MAR-22              NO    /oradata/orcl/undotbs01.dbf
  5       Full 3224162    18-MAR-22              NO    /oradata/orcl/lhh02.dbf
  7       Full 3224162    18-MAR-22              NO    /oradata/orcl/users01.dbf
  Backup Set Copy #1 of backup set 52
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:06     18-MAR-22       NO         TAG20220318T100213
    List of Backup Pieces for backup set 52 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    54      1   AVAILABLE   /home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t1554_.bkp
    55      2   AVAILABLE   /home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t18kj_.bkp
    56      3   AVAILABLE   /home/oracle/bak1/ORCL/backupset/2022_03_18/o1_mf_nnndf_TAG20220318T100213_k37t1cm2_.bkp
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
53      Full    10.19M     DISK        00:00:00     18-MAR-22      
        BP Key: 57   Status: AVAILABLE  Compressed: NO  Tag: TAG20220318T100220
        Piece Name: /home/oracle/fra/ORCL/autobackup/2022_03_18/o1_mf_s_1099648940_k37t1dyt_.bkp
  SPFILE Included: Modification time: 18-MAR-22
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 3224170      Ckp time: 18-MAR-22

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31462978/viewspace-2872572/,如需轉載,請註明出處,否則將追究法律責任。

相關文章