backupset 的再压缩,本地快速备份 磁带压缩备份

backup as compressed backupset backupset all;---两个backupset

According to documentation, compression feature added from 18c for rman backup backupset

http://ora-srv.wlv.ac.uk/oracle19c_doc/bradv/rman-backup-concepts.html#GUID-3F8EDAFC-8A29-4E7B-BFEC-087AE10EDC91

"Starting with Oracle Database Release 18c, while backing up backup sets, you can compress backup sets that were not previously compressed by using the BACKUP AS COMPRESSED BACKUPSET command."
 

SOLUTION

Need to use the correct syntax.

syntax:

RMAN> backup as compressed backupset backupset (" all | completed | from | integer ")


Example:

RMAN> backup as compressed backupset backupset all;
RMAN> backup as compressed backupset backupset ;

Test Case:

RMAN> list backup;

specification does not match any backup in the repository

RMAN> backup datafile 7;

Starting backup at 20-JUL-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/data/oradata//datafile/o1_mf_users_k7sfx4yq_.dbf
channel ORA_DISK_1: starting piece 1 at 20-JUL-22
channel ORA_DISK_1: finished piece 1 at 20-JUL-22
piece handle=/data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnndf_TAG20220720T223521_kfk0s9k8_.bkp tag=TAG20220720T223521 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-JUL-22

RMAN> list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
236     Full    25.53M     DISK        00:00:00     20-JUL-22
        BP Key: 237   Status: AVAILABLE  Compressed: NO  Tag: TAG20220720T223521                         ---> Compressed: NO
        Piece Name: /data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnndf_TAG20220720T223521_kfk0s9k8_.bkp
  List of Datafiles in backup set 236
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  7       Full 17620363   20-JUL-22              NO    /data/oradata//datafile/o1_mf_users_k7sfx4yq_.dbf

RMAN> backup as compressed backupset backupset 236;

Starting backup at 20-JUL-22
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=319, stamp=1110580521, piece=1
channel ORA_DISK_1: starting compressed piece 1 at 20-JUL-22
channel ORA_DISK_1: backup piece /data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnndf_TAG20220720T223521_kfk0s9k8_.bkp
piece handle=/data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnnnf__kfk0tkcf_.bkp comment=NONE
channel ORA_DISK_1: finished piece 1 at 20-JUL-22
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
Finished backup at 20-JUL-22

RMAN> list backup;
 

---原本只有236 ,拆分出了237 238 ,237没动的


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


BS Key  Type LV Size
------- ---- -- ----------
236     Full    25.53M
  List of Datafiles in backup set 236
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  7       Full 17620363   20-JUL-22              NO    /data/oradata//datafile/o1_mf_users_k7sfx4yq_.dbf

  Backup Set Copy #1 of backup set 236
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:00     20-JUL-22       NO         TAG20220720T223521

    List of Backup Pieces for backup set 236 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    237     1   AVAILABLE   /data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnndf_TAG20220720T223521_kfk0s9k8_.bkp

  Backup Set Copy #2 of backup set 236
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ --------------- ---------- ---
  DISK        00:00:00     20-JUL-22       YES        TAG20220720T223521                --> compressed backupset

    List of Backup Pieces for backup set 236 Copy #2
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    238     1   AVAILABLE   /data/fast_recovery_area//backupset/2022_07_20/o1_mf_nnnnf__kfk0tkcf_.bkp

RMAN>

你可能感兴趣的:(oracle)