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

news2024/11/13 13:09:11

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

1级备份变0级的原因 及 Enabling Change Tracking生效没有-CSDN博客  这个文档说明1级备份时没有找到0级就是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.coloradmin.cn/o/2115859.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

春日美食家:SpringBoot网上订餐系统

1 绪论 1.1 研究背景 随着互联网技术的快速发展&#xff0c;网络时代的到来&#xff0c;网络信息也将会改变当今社会。各行各业在日常企业经营管理等方面也在慢慢的向规范化和网络化趋势汇合[13]。电子商务必将成为未来商务的主流&#xff0c;因此对于餐饮行业来说&#xff0c;…

51单片机的无线病床呼叫系统【proteus仿真+程序+报告+原理图+演示视频】

1、主要功能 该系统由AT89C51/STC89C52单片机LCD1602显示模块温湿度传感器模块矩阵按键时钟模块等模块构成。适用于病床呼叫系统、16床位呼叫等相似项目。 可实现基本功能: 1、LCD1602实时显示北京时间、温湿度信息、呼叫床位等信息&#xff1b; 2、DHT11采集病房温湿度信息&…

RTMP播放器延迟最低可以做到多少?

技术背景 RTMP播放器的延迟可以受到多种因素的影响&#xff0c;包括网络状况、推流设置、播放器配置以及CDN分发等。因此&#xff0c;RTMP播放器的延迟并不是一个固定的数值&#xff0c;而是可以在一定范围内变化的。 正常情况下&#xff0c;网上大多看到的&#xff0c;针对R…

【GIS系列】通过Java代码高效实现ArcGIS SDE数据库的数据叠加分析

作者&#xff1a;后端小肥肠 &#x1f347; 我写过的文章中的相关代码放到了gitee&#xff0c;地址&#xff1a;xfc-fdw-cloud: 公共解决方案 &#x1f34a; 有疑问可私信或评论区联系我。 &#x1f951; 创作不易未经允许严禁转载。 本文涉及GDAL及GeoTools代码实践&#xff…

计算机毕业设计选题推荐-宠物店管理系统-Java/Python项目实战

✨作者主页&#xff1a;IT毕设梦工厂✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Py…

机器学习(9.2-9.8)pytorch学习(二)

文章目录 摘要Abstract 1 torch 和 torchvision1.1 查看CIFAR10数据集内容1.2 Dataloader的使用 2 神经网络的构建2.1 神经网络的基本骨架2.2 卷积层原理2.2.1 卷积基本原理2.2.2 padding 2.3 构建一个卷积神经网络2.4 池化层2.5 非线性激活2.5.1 RELU的使用2.5.2 Sigmoid的使用…

【开源免费】基于SpringBoot+Vue.J大学生租房平台(JAVA毕业设计)

本文项目编号 T 019 &#xff0c;文末自助获取源码 \color{red}{T019&#xff0c;文末自助获取源码} T019&#xff0c;文末自助获取源码 目录 一、系统介绍二、演示录屏三、启动教程四、功能截图五、文案资料5.1 选题背景5.2 国内外研究现状5.3 可行性分析 六、核心代码6.1 查…

java基础概念21-权限修饰符、代码块

一、权限修饰符 1-1、作用 权限修饰符&#xff0c;是用来控制一个成员能够被访问的范围的。 可以修饰&#xff1a;成员变量&#xff0c;方法&#xff0c;构造方法&#xff0c;内部类。 1-2、权限修饰符的分类 二、代码块 局部代码块构造代码块静态代码块 2-1、局部代码块 …

【C++ Primer Plus习题】12.5

大家好,这里是国中之林! ❥前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到网站。有兴趣的可以点点进去看看← 问题: 解答: main.cpp #include <iostream> #include <cstdlib> #in…

Linux-【组管理、权限管理、定时任务调度】

目录 前言 Linux组基本介绍 文件/目录 所有者 查看文件 所有者 修改文件所有者 文件/目录 所在组 修改文件/目录 所在组 其它组 改变用户所在组 权限的基本介绍 rwx权限 rwx作用到文件 rwx作用到目录 修改权限 第一种方式&#xff1a;、-、变更权限 第二种方式…

Java进阶13讲__第11讲

配置文件 日志 1. Properties属性文件 1.1 特点、作用 都只能是键值对键不能重复文件后缀一般是.properties结尾的 1.2 读取 package cn.hdc.oop10.properties;import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Properties; import j…

「iOS」折叠cell

iOS学习 前言简单的折叠cell效果原理 稍作修改总结 前言 在暑期仿写中&#xff0c;3G share项目里我们简单的使用了折叠cell。现在写一篇博客来总结该方法。 简单的折叠cell 效果 先看效果&#xff1a; 原理 将cell的高度设置为一个单元格的高度。创建一个按钮&#xff0…

【C++】作用域指针、智能指针、共享指针、弱指针

十、智能指针、共享指针 从上篇文章 【C】如何用C创建对象&#xff0c;理解作用域、堆栈、内存分配-CSDN博客 中我们知道&#xff0c;你的对象是创建在栈上还是在堆上&#xff0c;最大的区别就是对象的作用域不一样。所以在C中&#xff0c;一旦程序进入另外一个作用域&#xf…

【xinference】(19):在L40设备上通过Xinference框架,快速部署CogVideoX-5b模型,可以生成6秒视频,速度比409D快一点

1&#xff0c;关于Xinference Xorbits Inference (Xinference) 是一个开源平台&#xff0c;用于简化各种 AI 模型的运行和集成。借助 Xinference&#xff0c;您可以使用任何开源 LLM、嵌入模型和多模态模型在云端或本地环境中运行推理&#xff0c;并创建强大的 AI 应用。 htt…

鸿蒙开发笔记_电商严选01_登录页面(静态页面)

由于上班较忙,抽空闲暇时间,快速更新中。。。 效果图 登录页面(静态页面) import CommonConstants from ./CommonConstants;/*** 登录页面*/ // 输入文本框,的自定义样式扩展 // @Extend装饰器表示继承、扩展的意思。这里代表:自定义样式扩展 @Extend(TextInput) functio…

Qt使用小技巧之按钮动态变化

前言 最近写小demo中无意发现的&#xff0c;是想实现当鼠标悬停到按钮上面的时候&#xff0c;按钮实现动态变化&#xff0c;让人知道鼠标经过了按钮&#xff0c;效果如下 hoverDynamicPushButton 正文 首先是将按钮的边框给去掉&#xff0c;然后设置下它的悬停伪状态就行了 格…

linux日常使用命令总结

一、文件复制 在 Linux 中&#xff0c;复制文件是一个常见的操作&#xff0c;通常使用 cp 命令来完成。cp 命令提供了丰富的选项来满足不同的需求。下面是使用 cp 命令复制文件的一些基本用法和示例。 基本用法 cp 命令的基本语法如下&#xff1a; cp [选项] 源文件 目标文…

京东获得JD商品详情 API 返回值说明||京东商品详情数据采集API接口详解

item_get-获得JD商品详情 公共参数 名称类型必须描述keyString是调用key&#xff08;必须以GET方式拼接在URL中&#xff09;secretString是调用密钥api_nameString是API接口名称&#xff08;包括在请求地址中&#xff09;[item_search,item_get,item_search_shop等]cacheStri…

了解分布式事务与本地事物基本概念

一、本地事物 1、事物的基本性质 数据库事物的几个特性&#xff1a;原子性、一致性、隔离性、持久性&#xff0c;简称ACID&#xff1b; 原子性&#xff1a;一系列的操作整体不可拆分&#xff0c;要么全成功&#xff0c;要么同时失败。 一致性&#xff1a;数据在事物的前后&am…

SpringMVC上

SpringMVC介绍 MVC模型 MVC全称Model View Controller&#xff0c;是一种设计创建Web应用程序的模式。这三个单词分别代表Web应用程序的三个部分&#xff1a; Model&#xff08;模型&#xff09;&#xff1a;指数据模型。用于存储数据以及处理用户请求的业务逻辑。在Web应用…