Oracle rman 没有0级时1级备份和0级大小一样,可以用来做恢复 resetlogs后也可以

文档说了 full backup 不能 用于后续的level 1,没说level 1没有level 0 是不是level 1就是level 0?

GOAL

What are incremental backups? Why are archivelogs still required to recover a database from an 'online' incremental backup?

Discuss the relationship and/or dependency between incremental backup and archivelogs.
 

SOLUTION

Incremental backups can be either level 0 or level 1. A level 0 incremental backup, which is the base for subsequent incremental level 1 backups, copies all blocks containing data, backing the datafile up into a backup set just as a full backup would. The only difference between a level 0 incremental backup and a full backup is that a full backup cannot be used for level 1 backups.

A level 1 incremental backup can be either of the following types:

  • A differential backup, which backs up all blocks changed after the most recent incremental backup at level 1 or 0. This is the default.--差量

  • A cumulative backup, which backs up all blocks changed after the most recent incremental backup at level 0--增量

You can take incremental backups of databases, individual tablespaces or datafiles.

The two most important reasons for making incremental backups are:

  • For use in a strategy based on incrementally updated backups, where these incremental backups are used to periodically roll forward an image copy of the database. This is known as an incremental merge, or the "Oracle Recommended Backup" strategy.

  • To save time and space for daily backups - perhaps take a level 0 on the weekends, and level 1 on the weekdays.

All incremental backups are can be taken in either ONLINE or OFFLINE backup mode. All ONLINE backups, incremental or otherwise, need archivelogs for recovery.

For demonstration purposes, see the restore preview from an ONLINE backup below:



RMAN> restore datafile 7 preview;---- 这个比validate 好用。


Starting restore at 19 FEB 2013 14:25:43
using channel ORA_DISK_1


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
113     Incr 0  1.35G      DISK        00:01:04     19 FEB 2013 14:10:36   [1]
        BP Key: 113   Status: AVAILABLE  Compressed: NO  Tag: <tag_name>
        Piece Name: /<path>/<backuppiece_name>
  List of Datafiles in backup set 113
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  7    0  Incr 10269611   19 FEB 2013 14:10:35 /<path>/<filename>

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
120     Incr 1  3.98M      DISK        00:00:37     19 FEB 2013 14:17:31    [2]
        BP Key: 120   Status: AVAILABLE  Compressed: NO  Tag: <tag_name>
        Piece Name: /<path>/<backuppiece_name>
  List of Datafiles in backup set 120
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  7    1  Incr 10270514   19 FEB 2013 14:17:29 /<path>/<filename>  [4]

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


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------------
124     50.00K     DISK        00:00:00     19 FEB 2013 14:18:35    [3]
        BP Key: 124   Status: AVAILABLE  Compressed: NO  Tag: <tag_name>

         Piece Name: /<path>/<backuppiece_name>

  List of Archived Logs in backup set 124
  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
  ---- ------- ---------- -------------------- ---------- ---------
  1    80      10270506   19 FEB 2013 14:17:26 10270522   19 FEB 2013 14:17:36
  1    81      10270522   19 FEB 2013 14:17:36 10270525   19 FEB 2013 14:17:39
  1    82      10270525   19 FEB 2013 14:17:39 10270528   19 FEB 2013 14:17:47
  1    83      10270528   19 FEB 2013 14:17:47 10270564   19 FEB 2013 14:18:21
  1    84      10270564   19 FEB 2013 14:18:21 10270567   19 FEB 2013 14:18:22
  1    85      10270567   19 FEB 2013 14:18:22 10270575   19 FEB 2013 14:18:27
  1    86      10270575   19 FEB 2013 14:18:27 10270578   19 FEB 2013 14:18:28
  1    87      10270578   19 FEB 2013 14:18:28 10270581   19 FEB 2013 14:18:29
  1    88      10270581   19 FEB 2013 14:18:29 10270594   19 FEB 2013 14:18:34


List of Archived Log Copies for database with db_unique_name <db_unique_name>
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - --------------------
429     1    89      A 19 FEB 2013 14:18:34
        Name: /<path>/<archivelog_filename>

430     1    90      A 19 FEB 2013 14:23:57
        Name: /<path>/<archivelog_filename>

Media recovery start SCN is 10270514   [4]
Recovery must be done beyond SCN 10270514 to clear datafile fuzziness
Finished restore at 19 FEB 2013 14:25:43

From the above we can see:

[1] -- this is the level 0 backup

[2] -- this is the level 1 backup

[3] -- if the last backup is a level 1, we only need archivelogs generated during the period of the level 1 backup. The archivelogs generated during the level 0 is not required for recovery.

0-1级之间的archivelog不再需要了!!

[4] -- this SCN is when the incremental 1 was taken, confirming once again that we need archivelogs starting from the latest incremental level 1 backup

A level 0 restore preview is also attached to this note.

This applies to 10g as well as to 11g.

Note: Incremental level 1 backups are never used for block media recovery (BMR). RMAN will restore the block from the level 0 backup, and then apply all archivelogs from the level 0 onwards. 如果没有archivelog,不能block级别恢复, 只能0级恢复datafile 再1级恢复datafile ,在用archivelog了

 
For further details, please review the Oracle Documentation:

# Oracle 10g
Backing Up Databases Using RMAN
Oracle Database Backup and Recovery Basics
10g Release 2 (10.2)
Part Number B14192-03
.
 4 Backing Up Databases Using RMAN
   ..
   RMAN Incremental Backups
 


# Oracle 11g
RMAN Backup Concepts
Oracle Database Backup and Recovery User's Guide
11g Release 2 (11.2)
Part Number E10642-05
.
 8 RMAN Backup Concepts  
   .
    Incremental Backups

[oracle@rac3 rman_backup]$ du -sk /nfs
24708   /nfs


[oracle@rac3 rman_backup]$ sh -x /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh cdb daily
+ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ export 'NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS'
+ NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
++ basename cdb
+ ORACLE_DB=cdb
++ basename daily
+ BACKUP_OPTION=daily
+ case `hostname` in
++ hostname
+ ORACLE_SID=cdb3
+ export ORACLE_SID
++ dirname /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh
++ basename cdb
++ date +%Y%m%d%H%M%S
+ RMAN_LOG_FILE=/home/oracle/rman_backup/log/cdb_fra_20240907041509.out
+ RMAN=/u01/app/oracle/product/19.0.0/db_1/bin/rman
++ date +%Y%m%d%H%M%S
+ BACKUP_TAG=cdb_20240907041509_level0
+ echo 'ORACLE DB name: cdb'
+ echo 'ORACLE instance : cdb3'
+ ORACLE_USER=oracle
+ TARGET_CONNECT_STR=/
+ '[' cdb = cdb ']'
+ CATALOG_CONNECT_STR=nocatalog
+ export SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ export NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ export IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ export IngrianNAE_Properties_Conf_SessionID_Max=100
+ IngrianNAE_Properties_Conf_SessionID_Max=100
+ export ORACLE_UNQNAME=cdb
+ ORACLE_UNQNAME=cdb
++ hostname
+ NB_ORA_CLIENT=rac3
+ NB_ORA_SERV=nxxxxx
+ NB_ORA_POLICY=NP2_ORAC_DB_Backup
+ RMAN_SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64
+ RMAN_PARMS='PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)"'
+ case $BACKUP_OPTION in
+ NB_ORA_SCHED=Daily
+ echo
+ echo 'RMAN: /u01/app/oracle/product/19.0.0/db_1/bin/rman'
+ echo 'ORACLE_SID: cdb3'
+ echo 'ORACLE_USER: oracle'
+ echo 'ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_1'
+ echo
+ echo 'NB_ORA_SERV: nxxxxx'
+ echo 'NB_ORA_CLIENT: rac3'
+ echo 'NB_ORA_POL/ICY: NP2_ORAC_DB_Backup'
+ echo 'NB_ORA_SCHED: Daily'
+ echo
+ CMD_STR='
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907041509.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ '[' '' = root ']'
+ /usr/bin/sh -c '
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907041509.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ RSTAT=0
+ echo ==========================================================================
+ echo
[oracle@rac3 rman_backup]$ du -sk /nfs
1598164 /nfs   1级备份和0级备份一样大的
[oracle@rac3 rman_backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 7 04:16:39 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CDB (DBID=2265125454)

RMAN> startup force mount;

Oracle instance started
database mounted

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                956301312 bytes
Database Buffers            1409286144 bytes
Redo Buffers                   7606272 bytes

RMAN> 

RMAN> run 
2> {  
3> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
4> restore database;
5> recover database;
6> RELEASE CHANNEL ch00;
7> }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=33 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-SEP-24

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1179026801
skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1179026801
skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1179026801
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.261.1179026585
channel ch00: reading from backup piece re34d46k_878_1_1
channel ch00: piece handle=re34d46k_878_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00020 to +DATA/CDB/DATAFILE/test.347.1179026645
channel ch00: reading from backup piece rf34d46k_879_1_1
channel ch00: piece handle=rf34d46k_879_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.287.1179026585
channel ch00: reading from backup piece rd34d46k_877_1_1
channel ch00: piece handle=rd34d46k_877_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.274.1179026589
channel ch00: reading from backup piece ri34d46l_882_1_1
channel ch00: piece handle=ri34d46l_882_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.267.1179026649
channel ch00: reading from backup piece rh34d46l_881_1_1
channel ch00: piece handle=rh34d46l_881_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1179026645
channel ch00: reading from backup piece r534d46j_869_1_1
channel ch00: piece handle=r534d46j_869_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.270.1179026649
channel ch00: reading from backup piece rg34d46k_880_1_1
channel ch00: piece handle=rg34d46k_880_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.265.1179026651
channel ch00: reading from backup piece ra34d46j_874_1_1
channel ch00: piece handle=ra34d46j_874_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.275.1179026597
channel ch00: reading from backup piece r834d46j_872_1_1
channel ch00: piece handle=r834d46j_872_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.360.1179026589
channel ch00: reading from backup piece rc34d46k_876_1_1
channel ch00: piece handle=rc34d46k_876_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.268.1179026653
channel ch00: reading from backup piece r434d46j_868_1_1
channel ch00: piece handle=r434d46j_868_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.282.1179026605
channel ch00: reading from backup piece r634d46j_870_1_1
channel ch00: piece handle=r634d46j_870_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:25
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/CDB/DATAFILE/system.363.1179026669
channel ch00: reading from backup piece r334d46j_867_1_1
channel ch00: piece handle=r334d46j_867_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:35
Finished restore at 07-SEP-24

Starting recover at 07-SEP-24

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 07-SEP-24

released channel: ch00

RMAN> alter database open;--可以恢复

本地搞个全部删掉数据文件看看

RMAN> backup  device type disk incremental level 0 
2> as compressed backupset 
3> database force;

Starting backup at 07-SEP-24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=819 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=60 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=61 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=58 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_6
channel ORA_DISK_6: SID=820 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_7
channel ORA_DISK_7: SID=59 instance=cdb3 device type=DISK
allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=818 instance=cdb3 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/CDB/DATAFILE/system.363.1179026669
channel ORA_DISK_1: starting piece 1 at 07-SEP-24
channel ORA_DISK_2: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/CDB/DATAFILE/sysaux.268.1179026653
channel ORA_DISK_2: starting piece 1 at 07-SEP-24
channel ORA_DISK_3: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/CDB/DATAFILE/undotbs1.269.1179026645
channel ORA_DISK_3: starting piece 1 at 07-SEP-24
channel ORA_DISK_4: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00011 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.282.1179026605
channel ORA_DISK_4: starting piece 1 at 07-SEP-24
channel ORA_DISK_5: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_5: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1179026801
channel ORA_DISK_5: starting piece 1 at 07-SEP-24
channel ORA_DISK_6: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_6: specifying datafile(s) in backup set
input datafile file number=00012 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.275.1179026597
channel ORA_DISK_6: starting piece 1 at 07-SEP-24
channel ORA_DISK_7: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_7: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1179026801
channel ORA_DISK_7: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/CDB/DATAFILE/undotbs2.265.1179026651
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_3: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.336.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:00
channel ORA_DISK_3: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00008 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1179026801
channel ORA_DISK_3: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.318.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00013 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.360.1179026589
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.390.1179029973 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00014 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.287.1179026585
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.278.1179029973 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00015 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.261.1179026585
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.256.1179029975 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00020 name=+DATA/CDB/DATAFILE/test.347.1179026645
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.380.1179029977 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00010 name=+DATA/CDB/DATAFILE/undotbs3.270.1179026649
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.315.1179029977 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/CDB/DATAFILE/users.267.1179026649
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.399.1179029979 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_8: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_8: specifying datafile(s) in backup set
input datafile file number=00016 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.274.1179026589
channel ORA_DISK_8: starting piece 1 at 07-SEP-24
channel ORA_DISK_8: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.382.1179029983 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_8: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.272.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:14
channel ORA_DISK_7: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.419.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_7: backup set complete, elapsed time: 00:00:19
channel ORA_DISK_6: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.409.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_6: backup set complete, elapsed time: 00:00:27
channel ORA_DISK_2: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.319.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:37
channel ORA_DISK_4: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.417.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:47
channel ORA_DISK_5: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.288.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 00:00:47
channel ORA_DISK_1: finished piece 1 at 07-SEP-24
piece handle=+DATA1/CDB/BACKUPSET/2024_09_07/nnndn0_tag20240907t041930_0.376.1179029971 tag=TAG20240907T041930 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:57
Finished backup at 07-SEP-24

Starting Control File and SPFILE Autobackup at 07-SEP-24
piece handle=+DATA1/CDB/AUTOBACKUP/2024_09_07/s_1179030027.273.1179030027 comment=NONE
Finished Control File and SPFILE Autobackup at 07-SEP-24

RMAN> exit


Recovery Manager complete.
[oracle@rac3 rman_backup]$ su - grid
Password: 
Last login: Sat Sep  7 04:01:17 EDT 2024
[grid@rac3 ~]$ asmcmd
ASMCMD> cd data
ASMCMD> cd CDB
ASMCMD> ls
0633F844101D69CBE0636401A8C09D55/
06344F62B8C65A17E0636401A8C0F073/
CHANGETRACKING/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
 
ASMCMD>  rm -rf 0633F844101D69CBE0636401A8C09D55 06344F62B8C65A17E0636401A8C0F073 DATAFILE

-----全部删掉          
  

[oracle@rac3 rman_backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 7 04:21:46 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup mount;

Oracle instance started
database mounted

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                956301312 bytes
Database Buffers            1409286144 bytes
Redo Buffers                   7606272 bytes

RMAN> run 
2> {  
3> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
4> restore database;
5> recover database;
6> RELEASE CHANNEL ch00;
7> }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=34 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-SEP-24

channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.261.1179026585
channel ch00: reading from backup piece re34d46k_878_1_1
channel ch00: piece handle=re34d46k_878_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00020 to +DATA/CDB/DATAFILE/test.347.1179026645
channel ch00: reading from backup piece rf34d46k_879_1_1
channel ch00: piece handle=rf34d46k_879_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.287.1179026585
channel ch00: reading from backup piece rd34d46k_877_1_1
channel ch00: piece handle=rd34d46k_877_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.274.1179026589
channel ch00: reading from backup piece ri34d46l_882_1_1
channel ch00: piece handle=ri34d46l_882_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.267.1179026649
channel ch00: reading from backup piece rh34d46l_881_1_1
channel ch00: piece handle=rh34d46l_881_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1179026645
channel ch00: reading from backup piece r534d46j_869_1_1
channel ch00: piece handle=r534d46j_869_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.270.1179026649
channel ch00: reading from backup piece rg34d46k_880_1_1
channel ch00: piece handle=rg34d46k_880_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.265.1179026651
channel ch00: reading from backup piece ra34d46j_874_1_1
channel ch00: piece handle=ra34d46j_874_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1179026801
channel ch00: reading from backup piece rb34d46j_875_1_1
channel ch00: piece handle=rb34d46j_875_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1179026801
channel ch00: reading from backup piece r934d46j_873_1_1
channel ch00: piece handle=r934d46j_873_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.275.1179026597
channel ch00: reading from backup piece r834d46j_872_1_1
channel ch00: piece handle=r834d46j_872_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.360.1179026589
channel ch00: reading from backup piece rc34d46k_876_1_1
channel ch00: piece handle=rc34d46k_876_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.268.1179026653
channel ch00: reading from backup piece r434d46j_868_1_1
channel ch00: piece handle=r434d46j_868_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1179026801
channel ch00: reading from backup piece r734d46j_871_1_1
channel ch00: piece handle=r734d46j_871_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:25
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.282.1179026605
channel ch00: reading from backup piece r634d46j_870_1_1
channel ch00: piece handle=r634d46j_870_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/CDB/DATAFILE/system.363.1179026669
channel ch00: reading from backup piece r334d46j_867_1_1
channel ch00: piece handle=r334d46j_867_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:35
Finished restore at 07-SEP-24

Starting recover at 07-SEP-24

starting media recovery

archived log for thread 3 with sequence 77 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_77.368.1179029937
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=76
channel ch00: reading from backup piece rj34d48d_883_1_1
channel ch00: piece handle=rj34d48d_883_1_1 tag=TAG20240907T041613
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.258.1179030257 thread=3 sequence=76
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.258.1179030257 RECID=464 STAMP=1179030257
media recovery complete, elapsed time: 00:00:01
Finished recover at 07-SEP-24

released channel: ch00

RMAN> alter database open;

Statement processed

RMAN>

------有一级备份时-----------------

[oracle@rac3 rman_backup]$ du -sk /nfs
1598164 /nfs
[oracle@rac3 rman_backup]$ 
[oracle@rac3 rman_backup]$ 
[oracle@rac3 rman_backup]$ 
[oracle@rac3 rman_backup]$ sh -x /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh cdb daily
+ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ export 'NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS'
+ NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
++ basename cdb
+ ORACLE_DB=cdb
++ basename daily
+ BACKUP_OPTION=daily
+ case `hostname` in
++ hostname
+ ORACLE_SID=cdb3
+ export ORACLE_SID
++ dirname /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh
++ basename cdb
++ date +%Y%m%d%H%M%S
+ RMAN_LOG_FILE=/home/oracle/rman_backup/log/cdb_fra_20240907042923.out
+ RMAN=/u01/app/oracle/product/19.0.0/db_1/bin/rman
++ date +%Y%m%d%H%M%S
+ BACKUP_TAG=cdb_20240907042923_level0
+ echo 'ORACLE DB name: cdb'
+ echo 'ORACLE instance : cdb3'
+ ORACLE_USER=oracle
+ TARGET_CONNECT_STR=/
+ '[' cdb = cdb ']'
+ CATALOG_CONNECT_STR=nocatalog
+ export SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ export NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ export IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ export IngrianNAE_Properties_Conf_SessionID_Max=100
+ IngrianNAE_Properties_Conf_SessionID_Max=100
+ export ORACLE_UNQNAME=cdb
+ ORACLE_UNQNAME=cdb
++ hostname
+ NB_ORA_CLIENT=rac3
+ NB_ORA_SERV=nxxxxx
+ NB_ORA_POLICY=NP2_ORAC_DB_Backup
+ RMAN_SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64
+ RMAN_PARMS='PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)"'
+ case $BACKUP_OPTION in
+ NB_ORA_SCHED=Daily
+ echo
+ echo 'RMAN: /u01/app/oracle/product/19.0.0/db_1/bin/rman'
+ echo 'ORACLE_SID: cdb3'
+ echo 'ORACLE_USER: oracle'
+ echo 'ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_1'
+ echo
+ echo 'NB_ORA_SERV: nxxxxx'
+ echo 'NB_ORA_CLIENT: rac3'
+ echo 'NB_ORA_POL/ICY: NP2_ORAC_DB_Backup'
+ echo 'NB_ORA_SCHED: Daily'
+ echo
+ CMD_STR='
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907042923.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ '[' '' = root ']'
+ /usr/bin/sh -c '
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907042923.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ RSTAT=0
+ echo ==========================================================================
+ echo
[oracle@rac3 rman_backup]$ du -sk /nfs
1690908 /nfs  ---------------增加了几百M而已
[oracle@rac3 rman_backup]$ 

--------------------------------------------------------搞个resetlogs试试----------------------------------------

[oracle@rac3 rman_backup]$ du -sk /nfs
1690908 /nfs
[oracle@rac3 rman_backup]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Sep 7 04:30:52 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> shutdown abort     
ORACLE instance shut down.
SQL> recover database until cancel;
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


SQL> startup mount;
ORACLE instance started.

Total System Global Area 2382361320 bytes
Fixed Size                  9167592 bytes
Variable Size             956301312 bytes
Database Buffers         1409286144 bytes
Redo Buffers                7606272 bytes
Database mounted.
SQL>  recover database until cancel;
ORA-00279: change 10939255 generated at 09/07/2024 04:29:30 needed for thread 3
ORA-00289: suggestion : +DATA1
ORA-15173: entry 'ARCHIVELOG' does not exist in directory 'CDB'
ORA-00280: change 10939255 for thread 3 is in sequence #81


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.258.1179030223'


ORA-01112: media recovery not started


SQL> recover database
Media recovery complete.
SQL> ;
SP2-0223: No lines in SQL buffer.
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> recover database using backup controlfile until cance;
ORA-00277: illegal option to the UNTIL recovery flag CANCE


SQL>  recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-38872: Cannot perform backup control file recovery if Flashback Database is
enabled.


SQL> alter database flashback off;     

Database altered.

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 11039438 generated at 09/07/2024 04:31:01 needed for thread 3
ORA-00289: suggestion : +DATA1
ORA-00280: change 11039438 for thread 3 is in sequence #81


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;

Database altered.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 rman_backup]$ sh -x /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh cdb daily
+ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
+ export 'NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS'
+ NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
++ basename cdb
+ ORACLE_DB=cdb
++ basename daily
+ BACKUP_OPTION=daily
+ case `hostname` in
++ hostname
+ ORACLE_SID=cdb3
+ export ORACLE_SID
++ dirname /home/oracle/rman_backup/rman_backup_fradb3_pdb.sh
++ basename cdb
++ date +%Y%m%d%H%M%S
+ RMAN_LOG_FILE=/home/oracle/rman_backup/log/cdb_fra_20240907043339.out
+ RMAN=/u01/app/oracle/product/19.0.0/db_1/bin/rman
++ date +%Y%m%d%H%M%S
+ BACKUP_TAG=cdb_20240907043339_level0
+ echo 'ORACLE DB name: cdb'
+ echo 'ORACLE instance : cdb3'
+ ORACLE_USER=oracle
+ TARGET_CONNECT_STR=/
+ '[' cdb = cdb ']'
+ CATALOG_CONNECT_STR=nocatalog
+ export SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ SFNT_HSMAPI_BASE=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000
+ export NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ NAE_Properties_Conf_Filename=/opt/oracle/extapi/64/hsm/safenet/8.9.0.000/IngrianNAE.properties
+ export IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ IngrianNAE_Properties_Conf_Slot_ID_Max=100
+ export IngrianNAE_Properties_Conf_SessionID_Max=100
+ IngrianNAE_Properties_Conf_SessionID_Max=100
+ export ORACLE_UNQNAME=cdb
+ ORACLE_UNQNAME=cdb
++ hostname
+ NB_ORA_CLIENT=rac3
+ NB_ORA_SERV=nxxxxx
+ NB_ORA_POLICY=NP2_ORAC_DB_Backup
+ RMAN_SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64
+ RMAN_PARMS='PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)"'
+ case $BACKUP_OPTION in
+ NB_ORA_SCHED=Daily
+ echo
+ echo 'RMAN: /u01/app/oracle/product/19.0.0/db_1/bin/rman'
+ echo 'ORACLE_SID: cdb3'
+ echo 'ORACLE_USER: oracle'
+ echo 'ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_1'
+ echo
+ echo 'NB_ORA_SERV: nxxxxx'
+ echo 'NB_ORA_CLIENT: rac3'
+ echo 'NB_ORA_POL/ICY: NP2_ORAC_DB_Backup'
+ echo 'NB_ORA_SCHED: Daily'
+ echo
+ CMD_STR='
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907043339.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ '[' '' = root ']'
+ /usr/bin/sh -c '
ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_HOME
ORACLE_SID=cdb3
export ORACLE_SID
/u01/app/oracle/product/19.0.0/db_1/bin/rman target / nocatalog msglog /home/oracle/rman_backup/log/cdb_fra_20240907043339.out append << EOF
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
show all;
RUN {
ALLOCATE CHANNEL ch00 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch01 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch02 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch03 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch04 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch05 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch06 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch07 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch08 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch09 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch10 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch11 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch12 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch13 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch14 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
ALLOCATE CHANNEL ch15 TYPE '\''SBT_TAPE'\'' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
send '\''NB_ORA_SERV=nxxxxx, NB_ORA_CLIENT=rac3, NB_ORA_POLICY=NP2_ORAC_DB_Backup, NB_ORA_SCHED=Daily'\'';
backup incremental level 1 
as compressed backupset 
DATABASE root pluggable database pdb ,'\''PDB\$SEED'\''  plus archivelog ;
#database force filesperset=1;
delete noprompt archivelog all 
#completed before '\''sysdate-1'\'' device type '\''SBT_TAPE'\'' 
backed up 1 times to device type '\''SBT_TAPE'\'';
delete noprompt obsolete;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
RELEASE CHANNEL ch06;
RELEASE CHANNEL ch07;
RELEASE CHANNEL ch08;
RELEASE CHANNEL ch09;
RELEASE CHANNEL ch10;
RELEASE CHANNEL ch11;
RELEASE CHANNEL ch12;
RELEASE CHANNEL ch13;
RELEASE CHANNEL ch14;
RELEASE CHANNEL ch15;
}
EOF
'
+ RSTAT=0
+ echo ==========================================================================
+ echo
[oracle@rac3 rman_backup]$ du -sk /nfs
1784948 /nfs
[oracle@rac3 rman_backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 7 04:34:09 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CDB (DBID=2265125454)

RMAN> startup force mount;

Oracle instance started
database mounted

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                956301312 bytes
Database Buffers            1409286144 bytes
Redo Buffers                   7606272 bytes

RMAN> 

RMAN> 

RMAN> run 
2> {  
3> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
4> restore database;
5> recover database;
6> RELEASE CHANNEL ch00;
7> }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=29 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-SEP-24

skipping datafile 5; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.266.1179030181
skipping datafile 6; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.360.1179030145
skipping datafile 8; already restored to file +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.275.1179030139
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.363.1179030127
channel ch00: reading from backup piece re34d46k_878_1_1
channel ch00: piece handle=re34d46k_878_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00020 to +DATA/CDB/DATAFILE/test.268.1179030127
channel ch00: reading from backup piece rf34d46k_879_1_1
channel ch00: piece handle=rf34d46k_879_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.265.1179030129
channel ch00: reading from backup piece rd34d46k_877_1_1
channel ch00: piece handle=rd34d46k_877_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.270.1179030129
channel ch00: reading from backup piece ri34d46l_882_1_1
channel ch00: piece handle=ri34d46l_882_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.267.1179030131
channel ch00: reading from backup piece rh34d46l_881_1_1
channel ch00: piece handle=rh34d46l_881_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1179030131
channel ch00: reading from backup piece r534d46j_869_1_1
channel ch00: piece handle=r534d46j_869_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.347.1179030135
channel ch00: reading from backup piece rg34d46k_880_1_1
channel ch00: piece handle=rg34d46k_880_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.282.1179030135
channel ch00: reading from backup piece ra34d46j_874_1_1
channel ch00: piece handle=ra34d46j_874_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.274.1179030153
channel ch00: reading from backup piece r834d46j_872_1_1
channel ch00: piece handle=r834d46j_872_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.261.1179030159
channel ch00: reading from backup piece rc34d46k_876_1_1
channel ch00: piece handle=rc34d46k_876_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.287.1179030167
channel ch00: reading from backup piece r434d46j_868_1_1
channel ch00: piece handle=r434d46j_868_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.284.1179030207
channel ch00: reading from backup piece r634d46j_870_1_1
channel ch00: piece handle=r634d46j_870_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/CDB/DATAFILE/system.258.1179030223
channel ch00: reading from backup piece r334d46j_867_1_1
channel ch00: piece handle=r334d46j_867_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:35
Finished restore at 07-SEP-24

Starting recover at 07-SEP-24

starting media recovery

channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=76
channel ch00: reading from backup piece rj34d48d_883_1_1
channel ch00: piece handle=rj34d48d_883_1_1 tag=TAG20240907T041613
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.299.1179030981 thread=3 sequence=76
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.299.1179030981 RECID=476 STAMP=1179030980
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=77
channel ch00: reading from backup piece s834d516_904_1_1
channel ch00: piece handle=s834d516_904_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_77.299.1179030983 thread=3 sequence=77
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_77.299.1179030983 RECID=477 STAMP=1179030982
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=78
channel ch00: reading from backup piece s634d516_902_1_1
channel ch00: piece handle=s634d516_902_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_78.299.1179030985 thread=3 sequence=78
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_78.299.1179030985 RECID=478 STAMP=1179030983
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=79
channel ch00: reading from backup piece s734d516_903_1_1
channel ch00: piece handle=s734d516_903_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_79.299.1179030987 thread=3 sequence=79
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_79.299.1179030987 RECID=479 STAMP=1179030985
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=80
channel ch00: reading from backup piece su34d597_926_1_1
channel ch00: piece handle=su34d597_926_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_80.299.1179030989 thread=3 sequence=80
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_80.299.1179030989 RECID=480 STAMP=1179030986
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=81
channel ch00: reading from backup piece sv34d597_927_1_1
channel ch00: piece handle=sv34d597_927_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_81.299.1179030991 thread=3 sequence=81
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=1
channel ch00: reading from backup piece st34d597_925_1_1
channel ch00: piece handle=st34d597_925_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_1.300.1179030989 thread=3 sequence=1
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_81.299.1179030991 RECID=481 STAMP=1179030987
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_1.300.1179030989 RECID=482 STAMP=1179030989
media recovery complete, elapsed time: 00:00:00
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=2
channel ch00: reading from backup piece tj34d59b_947_1_1
channel ch00: piece handle=tj34d59b_947_1_1 tag=TAG20240907T043347
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_2.300.1179030991 RECID=483 STAMP=1179030990
Finished recover at 07-SEP-24

released channel: ch00

RMAN> alter database open;

Statement processed

RMAN> shutdown abort

Oracle instance shut down

RMAN> 

--------------------resetlogs 后吧文件删了试试----------

RMAN> shutdown abort

Oracle instance shut down

RMAN> exit


Recovery Manager complete.
[oracle@rac3 rman_backup]$ su - grid
Password: 
Last login: Sat Sep  7 04:31:11 EDT 2024
[grid@rac3 ~]$ asmcmd
ASMCMD> cd data/cdb
ASMCMD> ls
0633F844101D69CBE0636401A8C09D55/
06344F62B8C65A17E0636401A8C0F073/
CHANGETRACKING/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
ASMCMD> rm -rf 0633F844101D69CBE0636401A8C09D55 06344F62B8C65A17E0636401A8C0F073 DATAFILE
ASMCMD> exit
[grid@rac3 ~]$ exit
logout
[oracle@rac3 rman_backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Sep 7 04:38:30 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup mount;

Oracle instance started
database mounted

Total System Global Area    2382361320 bytes

Fixed Size                     9167592 bytes
Variable Size                956301312 bytes
Database Buffers            1409286144 bytes
Redo Buffers                   7606272 bytes

RMAN> run 
2> {  
3> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/nfs)";
4> restore database;
5> recover database;
6> RELEASE CHANNEL ch00;
7> }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=795 instance=cdb3 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API

Starting restore at 07-SEP-24

channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00015 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.363.1179030127
channel ch00: reading from backup piece re34d46k_878_1_1
channel ch00: piece handle=re34d46k_878_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00020 to +DATA/CDB/DATAFILE/test.268.1179030127
channel ch00: reading from backup piece rf34d46k_879_1_1
channel ch00: piece handle=rf34d46k_879_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00014 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.265.1179030129
channel ch00: reading from backup piece rd34d46k_877_1_1
channel ch00: piece handle=rd34d46k_877_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00016 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.270.1179030129
channel ch00: reading from backup piece ri34d46l_882_1_1
channel ch00: piece handle=ri34d46l_882_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00007 to +DATA/CDB/DATAFILE/users.267.1179030131
channel ch00: reading from backup piece rh34d46l_881_1_1
channel ch00: piece handle=rh34d46l_881_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00004 to +DATA/CDB/DATAFILE/undotbs1.269.1179030131
channel ch00: reading from backup piece r534d46j_869_1_1
channel ch00: piece handle=r534d46j_869_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00010 to +DATA/CDB/DATAFILE/undotbs3.347.1179030135
channel ch00: reading from backup piece rg34d46k_880_1_1
channel ch00: piece handle=rg34d46k_880_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00009 to +DATA/CDB/DATAFILE/undotbs2.282.1179030135
channel ch00: reading from backup piece ra34d46j_874_1_1
channel ch00: piece handle=ra34d46j_874_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:03
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00008 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.275.1179030139
channel ch00: reading from backup piece rb34d46j_875_1_1
channel ch00: piece handle=rb34d46j_875_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00006 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.360.1179030145
channel ch00: reading from backup piece r934d46j_873_1_1
channel ch00: piece handle=r934d46j_873_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00012 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.274.1179030153
channel ch00: reading from backup piece r834d46j_872_1_1
channel ch00: piece handle=r834d46j_872_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00013 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.261.1179030159
channel ch00: reading from backup piece rc34d46k_876_1_1
channel ch00: piece handle=rc34d46k_876_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:07
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00003 to +DATA/CDB/DATAFILE/sysaux.287.1179030167
channel ch00: reading from backup piece r434d46j_868_1_1
channel ch00: piece handle=r434d46j_868_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00005 to +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.266.1179030181
channel ch00: reading from backup piece r734d46j_871_1_1
channel ch00: piece handle=r734d46j_871_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:15
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00011 to +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.284.1179030207
channel ch00: reading from backup piece r634d46j_870_1_1
channel ch00: piece handle=r634d46j_870_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:25
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/CDB/DATAFILE/system.258.1179030223
channel ch00: reading from backup piece r334d46j_867_1_1
channel ch00: piece handle=r334d46j_867_1_1 tag=TAG20240907T041514
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:35
Finished restore at 07-SEP-24

Starting recover at 07-SEP-24

starting media recovery

archived log for thread 3 with sequence 3 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_3.300.1179031001
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=76
channel ch00: reading from backup piece rj34d48d_883_1_1
channel ch00: piece handle=rj34d48d_883_1_1 tag=TAG20240907T041613
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.299.1179031263 thread=3 sequence=76
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_76.299.1179031263 RECID=485 STAMP=1179031263
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=77
channel ch00: reading from backup piece s834d516_904_1_1
channel ch00: piece handle=s834d516_904_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_77.299.1179031265 thread=3 sequence=77
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_77.299.1179031265 RECID=486 STAMP=1179031265
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=78
channel ch00: reading from backup piece s634d516_902_1_1
channel ch00: piece handle=s634d516_902_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_78.299.1179031267 thread=3 sequence=78
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_78.299.1179031267 RECID=487 STAMP=1179031266
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=79
channel ch00: reading from backup piece s734d516_903_1_1
channel ch00: piece handle=s734d516_903_1_1 tag=TAG20240907T042926
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_79.299.1179031269 thread=3 sequence=79
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_79.299.1179031269 RECID=488 STAMP=1179031268
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=80
channel ch00: reading from backup piece su34d597_926_1_1
channel ch00: piece handle=su34d597_926_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_80.299.1179031271 thread=3 sequence=80
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_80.299.1179031271 RECID=489 STAMP=1179031269
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=81
channel ch00: reading from backup piece sv34d597_927_1_1
channel ch00: piece handle=sv34d597_927_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_81.299.1179031273 thread=3 sequence=81
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=1
channel ch00: reading from backup piece st34d597_925_1_1
channel ch00: piece handle=st34d597_925_1_1 tag=TAG20240907T043343
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_1.383.1179031271 thread=3 sequence=1
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_81.299.1179031273 RECID=490 STAMP=1179031270
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_1.383.1179031271 RECID=491 STAMP=1179031272
channel ch00: starting archived log restore to default destination
channel ch00: restoring archived log
archived log thread=3 sequence=2
channel ch00: reading from backup piece tj34d59b_947_1_1
channel ch00: piece handle=tj34d59b_947_1_1 tag=TAG20240907T043347
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:00:01
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_2.383.1179031273 thread=3 sequence=2
channel default: deleting archived log(s)
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_09_07/thread_3_seq_2.383.1179031273 RECID=492 STAMP=1179031273
media recovery complete, elapsed time: 00:00:01
Finished recover at 07-SEP-24

released channel: ch00

RMAN> alter database open;

Statement processed

RMAN> exit


Recovery Manager complete.
[oracle@rac3 rman_backup]$ du -sk /nfs
1784948 /nfs
[oracle@rac3 rman_backup]$ 

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     4
Next log sequence to archive   5
Current log sequence           5

SQL> 

视图:v$block_change_tracking
查看块跟踪的状态,跟踪文件的大小及位置

 

查看当前块跟踪的状态
SQL> select status from v$block_change_tracking;
STATUS
----------
DISABLED    --->关闭状态

 

也可通过后台进程CTWR(修改跟踪进程)判断,CTWR进程负责维护新的修改跟踪文件
ps -elf | grep ctwr | grep -v grep

 

开启块跟踪
SQL> alter database enable block change tracking;
Database altered.

 

SQL> select * from v$block_change_tracking;
STATUS    FILENAME                           BYTES
---------- ------------------------------ ----------
ENABLED   /u01/app/oracle/ORCL/changetra  11599872
          cking/o1_mf_8zqj5157_.chg
跟踪文件是自动在db_create_file_dest设置的目录下生成的,大小约11M

 

通过后台进程CTWR判断
ps -elf | grep ctwr | grep -v grep
0 S oracle  10379   1 0  75  0 - 186111 ?   22:30 ?    00:00:00 ora_ctwr_orcl

 

关闭块跟踪
SQL> alter database disable block change tracking;
Database altered.
关闭块跟踪会删除跟踪文件

 

SQL> select status from v$block_change_tracking;
STATUS
----------
DISABLED

 

如果db_create_file_dest目录没有设置,也可以在开启块跟踪时直接指定路径
SQL> alter database enable block change tracking using file '/u01/app/oracle/track.log';

Database altered.

 

SQL> select * from v$block_change_tracking;
STATUS    FILENAME                      BYTES
---------- -------------------------- ---------
ENABLED   /u01/app/oracle/track.log  11599872

 

更改跟踪文件的位置:


--可以使用alter database rename 语句来修改跟踪文件的位置,该命令会更新控制文件里的信息,命令必须在mount 状态下执行,如果数据库不能shutdown,那么可以先disable块跟踪,然后再指定新的位置,但是这样会丢失以前跟踪文件里的数据。

 

关闭数据库
SQL> shutdown immediate

 

移动文件
mv /u01/app/oracle/track.log /u01/app/track.log

 

启动到mount
sqlplus / as sysdba
SQL> startup mount

 

修改文件位置
SQL> alter database rename file '/u01/app/oracle/track.log' to '/u01/app/track.chg';

 

OPEN数据库
SQL> alter database open;

 

查看
SQL> select * from v$block_change_tracking;
STATUS    FILENAME                      BYTES
---------- -------------------------- ---------
ENABLED   /u01/app/track.chg         11599872


注释:
在使用RMAN 增量备份的情况下,启动块跟踪,在做增量备份时会缩短RMAN 备份的时间,因为不用扫描整个数据库。但是块跟踪也会带来其他的一些开销。所以要根据实际情况决定是否启用块跟踪。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/419084.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python学习13:对excel格式文件进行读写操作

读取excel的话需要下载第三方库&#xff1a; 常用的库:xlrd(读),xlwt(写),xlutils,openpyxl[-----pip install xxx-------] 这里推荐openpyxl pip install openpyxl excel读取的基本操作 # 2)基本操作: # 2.1)打开文件,获取工作簿 filename rD:\stdutyZiLiao\pythoneProje…

动态化-鸿蒙跨端方案介绍

一、背景 &#x1f449; 华为在2023.9.25官方发布会上宣布&#xff0c;新的鸿蒙系统将不再兼容安卓应用&#xff0c;这意味着&#xff0c;包括京东金融APP在内的所有安卓应用&#xff0c;在新的鸿蒙系统上将无法运行&#xff0c;需要重新开发专门适用于新鸿蒙系统的专版APP。 …

日语输入法平假名和片假名切换

在学日语输入法的时候&#xff0c;我们在使用罗马音输入的时候&#xff0c;在进行平假名和片假名切换&#xff1a; 1、使用电脑在打字&#xff0c;日语输入法切换的时候使用 Shift Alt 如果日语输入法显示为 A 需要切换为 あ的话可以按Caps Lock键 。&#xff08;相当于中文…

zblog自动生成文章插件(百度AI写作配图,图文并茂)

最近工作比较忙&#xff0c;导致自己的几个网站都无法手动更新&#xff0c;于是乎也想偷个懒把&#xff0c;让AI帮忙打理下自己的网站。我接触chatgpt等AI工具还是比较早了&#xff0c;从openai推出gpt3.5就一直在用&#xff0c;说实话&#xff0c;开始的时候用AI自动更新网站还…

「C++系列」日期/时间

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到网站&#xff1a;人工智能教程 文章目录 一、日期/时间1. C标准库&#xff08;C20之前&#xff09;<ctime>库中的关键组件&#xff1a; 2…

lnmp - tp6.0的安装和简单使用

概述 使用了很长时间的Mac M2芯片的电脑在之前使用虚拟机之前总有一些bug不是那么好用&#xff0c;周末之余重新安装了一下centos虚拟机&#xff0c;搭建了lnmp环境&#xff0c;打算自己挤时间&#xff0c;做一点应用&#xff0c;作为一次新的小小的尝试。 安装&更新 ce…

OCC开发_变高箱梁全桥建模

概述 上一篇文章《OCC开发_箱梁梁体建模》中详细介绍了箱梁梁体建模的过程。但是&#xff0c;对于实际桥梁&#xff0c;截面可能存在高度、腹板厚度、顶底板厚度变化&#xff0c;全桥的结构中心线存在平曲线和竖曲线。针对实际情况&#xff0c;通过一个截面拉伸来实现全桥建模显…

算法复杂度 —— 数据结构前言、算法效率、时间复杂度、空间复杂度、常见复杂度对比、复杂度算法题(旋转数组)

目录 一、数据结构前言 1、数据结构 2、算法 3、学习方法 二、 算法效率 引入概念&#xff1a;算法复杂度 三、时间复杂度 1、大O的渐进表示法 2、时间复杂度计算示例 四、空间复杂度 计算示例&#xff1a;空间复杂度 五、常见复杂度对比 六、复杂度算法题&…

《JavaEE进阶》----12.<SpringIOCDI【扫描路径+DI详解+经典面试题+总结】>

本篇博客主要讲解 扫描路径 DI详解&#xff1a;三种注入方式及优缺点 经典面试题 总结 五、环境扫描路径 虽然我们没有告诉Spring扫描路径是什么&#xff0c;但是有一些注解已经告诉Spring扫描路径是什么了 如启动类注解SpringBootApplication。 里面有一个注解是componentS…

【学习笔记】3GPP WG SA5 Rel-19标准化工作管理和编排

3GPP WG SA5 Rel-19标准化工作涵盖了管理和编排要求、管理阶段2和管理流程&#xff0c;以及阶段3 OpenAPI和YANG解决方案集&#xff0c;以在多供应商环境中为5G网络提供完整的管理互操作性能力。 SA5以WG SA1通过紧密跟踪其他3GPP工作组的进展&#xff0c;这些工作组产生新的网…

如何使div居中?CSS居中终极指南

前言 长期以来&#xff0c;如何在父元素中居中对齐一个元素&#xff0c;一直是一个让人头疼的问题&#xff0c;随着 CSS 的发展&#xff0c;越来越多的工具可以用来解决这个难题&#xff0c;五花八门的招式一大堆&#xff0c;这篇博客&#xff0c;旨在帮助你理解不同的居中方法…

【机器人工具箱Robotics Toolbox开发笔记(二)】Matlab中机器人工具箱的下载与安装

Matlab机器人工具箱(Robotics Toolbox)可从Peter Corke教授提供的网站上免费下载。网址为:http://www.petercorke.com/Robotics_Toolbox.html。 图1 网站所提供的机器人工具箱版本 在Downloading the Toolbox栏目中单击here按钮进入下载页面,然后在该页面中填写国家、组织…

Qt多语种开发教程

Qt作为跨平台的开发工具&#xff0c;早已应用到各行各业的软件开发中。 今天讲讲&#xff0c;Qt开发的正序怎么做多语言开发。就是说&#xff0c;你设置中文&#xff0c;就中文显示&#xff1b;设置英语就英文显示&#xff0c;设置繁体就繁体显示&#xff0c;设置发育就显示法语…

京东物流查询|开发者调用API接口实现

快递聚合查询的优势 1、高效整合多种快递信息。2、实时动态更新。3、自动化管理流程。 聚合国内外1500家快递公司的物流信息查询服务&#xff0c;使用API接口查询京东物流的便捷步骤&#xff0c;首先选择专业的数据平台的快递API接口&#xff1a;物流快递查询API接口-单号查询…

【C语言】详解结构体(下)(位段)

文章目录 前言1. 位段的含义2. 位段的声明3. 位段的内存分配&#xff08;重点&#xff09;3.1 存储方向的问题3.2 剩余空间利用的问题 4. 位段的跨平台问题5. 位段的应用6. 总结 前言 相信大部分的读者在学校或者在自学时结构体的知识时&#xff0c;可能很少会听到甚至就根本没…

win10不用anaconda安装tensorflow-cpu并导入pycharm

记录一下防止忘了 一、前提&#xff1a;已经安装了python3.6.4,想用tensorflow的包 二、在pycharm中File-Settings-Project Interpreter点“”号导入很慢&#xff0c;所以直接在cmd中使用 pip install -i https://mirrors.aliyun.com/pypi/simple tensorflow-cpu下载好&#x…

2024AI绘画工具排行榜:探索最受欢迎的AI绘图软件特点与选择指南

AI绘画工具各有优势&#xff0c;从开放性到对特定语言和文化的支持&#xff0c;以及对图像细节和艺术性的不同关注点&#xff0c;根据具体需求选择合适的工具 MidJourney 图片品质卓越&#xff0c;充满独特创意&#xff0c;初期能够免费获取数十账高质量图片&#xff0c;整个生…

(一)十分简易快速 自己训练样本 opencv级联haar分类器 车牌识别

🍂1、不说废话,现象展示 🍃图片识别 🍃视频识别 自己训练样本 十分简易快速 opencv级联ha

前端:Vue3学习-2

前端:Vue3学习-2 1. vue3 新特性-defineOptions2. vue3 新特性-defineModel3. vue3 Pinia-状态管理工具4. Pinia 持久化插件 -> pinia-plugin-persistedstate 1. vue3 新特性-defineOptions 如果要定义组件的name或其他自定义的属性&#xff0c;还是得回归原始得方法----再…

页面要突破手机安全区域来全屏显示(沉浸式模式显示),其他页面不需要,如何设置安全区域文字颜色

#效果图 ##思路遇到的问题 在aboutToAppear中使用window模块的 getLastWindow 和 setWindowLayoutFullScreen两个方法来处理全屏显示 设置沉浸式模式的特点&#xff1a; 在任何一个页面中设置过一次之后&#xff0c;其他页面也会跟着全屏显示 这么处理会出现问题&#xff1a…