Oracle rman 没有0级时1级备份和0级大小一样,可以用来做恢复 resetlogs后也可以
文档说了 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 备份的时间,因为不用扫描整个数据库。但是块跟踪也会带来其他的一些开销。所以要根据实际情况决定是否启用块跟踪。
相关文章:

Oracle rman 没有0级时1级备份和0级大小一样,可以用来做恢复 resetlogs后也可以
文档说了 full backup 不能 用于后续的level 1,没说level 1没有level 0 是不是level 1就是level 0? 1级备份变0级的原因 及 Enabling Change Tracking生效没有-CSDN博客 这个文档说明1级备份时没有找到0级就是0级备份,可以用来完整恢复的。…...

idea中配置Translation插件完成翻译功能
文章目录 idea下载插件配置有道云阿里云百度翻译开放平台 idea下载插件 idea中安装Translation插件 使用方法:右下角选择翻译引擎,鼠标选中想翻译的部分,右键翻译即可 之前一直用的微软的翻译,不需要配置,但是最近微软…...
如何看待:低代码开发平台的兴起无需经验?
在当今快速发展的技术时代,软件开发的需求日益增长,而专业开发人员的数量却远远跟不上需求的步伐。为了解决这一矛盾,低代码开发平台应运而生,它通过提供可视化的开发环境和拖拽式的编程方式,使得没有编程经验的用户也…...

OpenCV-轮廓检测
文章目录 一、简介1. 意义2.具体步骤 二、代码实现三、总结 一、简介 1. 意义 在OpenCV中,轮廓检测是图像处理中一个非常重要的环节,它允许我们识别图像中的形状。这个过程通常涉及几个步骤:读取图像、转换为灰度图、应用阈值处理ÿ…...

vue页面使用自定义字体
一、准备好字体文件 一般字体问价格式为 .tff,可以去包图网等等网站去下载,好看的太多了!!! 下载下来就是单个的 .tff文件,下载下来后可以进行重命名,但是不要改变他的后缀名,我把他…...
C++——list常见函数的使用和模拟实现(2)
在list的上一篇博客里实现了list基本的初始化、插入数据、删除数据的基本功能,这些功能的实现方式只是在原先链表的实现里加入了模版而已,但是list作为一个容器,它还有一个基础的东西——迭代器。list的迭代器和之前实现的string和vector很大…...
C 标准库 - `<float.h>`
C 标准库 - <float.h> 概述 <float.h> 是 C 标准库中的一个头文件,它定义了与浮点数类型相关的宏。这些宏提供了关于浮点数的属性信息,如精度、最小和最大值、以及舍入误差等。这个头文件对于需要精确控制浮点数行为的程序非常有用&#x…...

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

ROS2 Nav2 - Smac 规划器
系列文章目录 前言 SmacPlanner 是 Nav2 Planner 服务器的插件。它目前包括 3 个不同的插件: SmacPlannerHybrid:高度优化的完全可重新配置的 Hybrid-A* 实现,支持 Dubin 和 Reeds-Shepp 模型(足式、阿克曼和汽车模型)…...

LabVIEW环境中等待FPGA模块初始化完成
这个程序使用的是LabVIEW环境中的FPGA模块和I/O模块初始化功能,主要实现等待FAM(Field-Programmable Gate Array Module,FPGA模块)的初始化完成,并处理初始化过程中的错误。让我们逐步分析各部分的功能: 1.…...

手机TF卡格式化后数据恢复:方法、挑战与预防措施
在现代生活中,手机已经成为我们不可或缺的一部分,而TF卡(即MicroSD卡)作为手机存储的扩展,更是承载了我们大量的重要数据。然而,不慎的格式化操作往往导致数据丢失,给用户带来不…...

ceph对象存储使用的一些思考
导言 我在某司做对象存储约4年时间,作为研发人员,接触过大量的市场项目,对国内市场上对对象存储的使用有一些了解和思考。本文主要是对本人经历的过往对象存储项目中发现的一些问题进行总结。 背景如下: 基于ceph版本进行开发并进…...

单词排序C++实现
代码如下: #include<iostream> #include<string> #include<fstream> #include<map> #include<iomanip> #include<algorithm> #include<vector>int read_file(std::map<std::string,int> &map_words) {std::st…...

828华为云征文 | Flexus X 实例服务器网络性能深度评测
引言 随着互联网应用的快速发展,网络带宽和性能对云服务器的表现至关重要。在不同的云服务平台上,即便配置相同的带宽,实际的网络表现也可能有所差异。因此,了解并测试服务器的网络性能变得尤为重要。本文将以华为云X实例服务器为…...

STL —heap算法源码刨析 make_heap、push_heap、pop_heap、sort_heap操作分析
STL —heap算法源码刨析 heap算法概述push_heap 插入元素pop_heap 取出根节点元素sort_heap 按极值存放元素make_heap 将一段现有数据构造成heap程序测试 heap算法概述 heap的内部是一个完全二叉树,将极值存放在根节点。这个里的极值可分为最大值、最小值。根据极值…...

走进低代码表单开发(一):可视化表单数据源设计
在前文,我们已对勤研低代码平台的报表功能做了详细介绍。接下来,让我们深入探究低代码开发中最为常用的表单设计功能。一个完整的应用是由众多表单组合而成的,所以高效的表单设计在开发过程中起着至关重要的作用。让我们一同了解勤研低代码开…...

简单好用的OCR API
现如今,越来越多的科技产品可以帮助我们改善和提高相应的工作效率。OCR技术的出现,提高了人们的工作效率,其应用领域及其广泛。就拿应用了OCR技术的翔云文档识别服务来说,只需上传文档图片便可自动识别并返回文档中相应的内容。翔…...
c++的拷贝构造函数和赋值函数
拷贝构造函数和赋值函数 什么是拷贝构造 是一种特殊构造函数,如果没有显式的实现,编译器就会自动生成。 class 类名 { public:// 拷贝构造类名(const 类名& that){} }; 什么时候会调用拷贝构造 当使用一个类对象给另一个新的类对象初始化时&…...

什么自动猫砂盆才适合旅游党?4个选购技巧统统告诉你!
有没有能让我们防夹3天不在家都不用担心猫咪铲屎问题的方法?当然有了!自动猫砂盆就是最好的选择,要知道,有个好用合适的自动猫砂盆在家的话,根本不用担心生虫发臭的问题出现,因为自动猫砂盆能及时感应到猫咪…...

算法知识点————双指针【删除重复元素】【反转链表】
删除重复元素 题目://给你一个 非严格递增排列 的数组 nums ,请你 原地 删除重复出现的元素,使每个元素 只出现一次 ,返回删除后数组的新长度。元素的 相对顺序 应该保持 一致 。然后返回 nums 中唯一元素的个数 思路:…...

国防科技大学计算机基础课程笔记02信息编码
1.机内码和国标码 国标码就是我们非常熟悉的这个GB2312,但是因为都是16进制,因此这个了16进制的数据既可以翻译成为这个机器码,也可以翻译成为这个国标码,所以这个时候很容易会出现这个歧义的情况; 因此,我们的这个国…...

突破不可导策略的训练难题:零阶优化与强化学习的深度嵌合
强化学习(Reinforcement Learning, RL)是工业领域智能控制的重要方法。它的基本原理是将最优控制问题建模为马尔可夫决策过程,然后使用强化学习的Actor-Critic机制(中文译作“知行互动”机制),逐步迭代求解…...

基于距离变化能量开销动态调整的WSN低功耗拓扑控制开销算法matlab仿真
目录 1.程序功能描述 2.测试软件版本以及运行结果展示 3.核心程序 4.算法仿真参数 5.算法理论概述 6.参考文献 7.完整程序 1.程序功能描述 通过动态调整节点通信的能量开销,平衡网络负载,延长WSN生命周期。具体通过建立基于距离的能量消耗模型&am…...

Unity3D中Gfx.WaitForPresent优化方案
前言 在Unity中,Gfx.WaitForPresent占用CPU过高通常表示主线程在等待GPU完成渲染(即CPU被阻塞),这表明存在GPU瓶颈或垂直同步/帧率设置问题。以下是系统的优化方案: 对惹,这里有一个游戏开发交流小组&…...
React Native 开发环境搭建(全平台详解)
React Native 开发环境搭建(全平台详解) 在开始使用 React Native 开发移动应用之前,正确设置开发环境是至关重要的一步。本文将为你提供一份全面的指南,涵盖 macOS 和 Windows 平台的配置步骤,如何在 Android 和 iOS…...

使用分级同态加密防御梯度泄漏
抽象 联邦学习 (FL) 支持跨分布式客户端进行协作模型训练,而无需共享原始数据,这使其成为在互联和自动驾驶汽车 (CAV) 等领域保护隐私的机器学习的一种很有前途的方法。然而,最近的研究表明&…...

短视频矩阵系统文案创作功能开发实践,定制化开发
在短视频行业迅猛发展的当下,企业和个人创作者为了扩大影响力、提升传播效果,纷纷采用短视频矩阵运营策略,同时管理多个平台、多个账号的内容发布。然而,频繁的文案创作需求让运营者疲于应对,如何高效产出高质量文案成…...

Mysql中select查询语句的执行过程
目录 1、介绍 1.1、组件介绍 1.2、Sql执行顺序 2、执行流程 2.1. 连接与认证 2.2. 查询缓存 2.3. 语法解析(Parser) 2.4、执行sql 1. 预处理(Preprocessor) 2. 查询优化器(Optimizer) 3. 执行器…...

20个超级好用的 CSS 动画库
分享 20 个最佳 CSS 动画库。 它们中的大多数将生成纯 CSS 代码,而不需要任何外部库。 1.Animate.css 一个开箱即用型的跨浏览器动画库,可供你在项目中使用。 2.Magic Animations CSS3 一组简单的动画,可以包含在你的网页或应用项目中。 3.An…...

华为OD机考-机房布局
import java.util.*;public class DemoTest5 {public static void main(String[] args) {Scanner in new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextLine()) { // 注意 while 处理多个 caseSystem.out.println(solve(in.nextLine()));}}priv…...