Loading... # Part 1:RMAN备份计划 : Windows (单机) ## 一、备份条件 ### 1.1 归档日志 ```sql_more --目标库设置在归档日志下: SQL> archive log list SQL> shutdown immediate SQL> startup mount SQL> alter database archivelog; SQL> alter database open; SQL> archive log list SQL> alter system switch logfile; ``` ### 1.2 日期格式 > Batch批处理根据此格式为备份日志文件命名. > 设置windows日期格式为:YYYY-MM-DD > 时间格式为:HH:MM:SS > 24小时制. ## 二、备份路径 > ```bash > 备份数据库 D:\RMAN_Backup\Data > 备份控制文件 D:\RMAN_Backup\Controlfile > 备份归档日志 D:\RMAN_Backup\Archivelog > 备份日志 D:\RMAN_Backup\Log > 备份脚本 D:\RMAN_Backup\RMAN_Backup_Scripts > ``` ## 三、备份计划 ### 3.1 备份时间 > Windows添加任务计划, 执行备份脚本(02:00:00) ### 3.2 一周备份 ```bash 周日:0级增量备份 周一:1级增量备份 周二:1级增量备份 周三:1级增量备份 周四:0级增量备份 周五:1级增量备份 周六:1级增量备份 ``` ### 3.3 备份策略 #### a、保留策略 ```sql -- 保留策略默认7改为14天, 可以恢复到14天内任何时间点 configure retention policy to recovery window of 14 days; ``` #### b、控制文件自动备份 #### c、备份优化 #### d、控制文件保留备份集信息的时间 ```sql -- 控制文件keep time值应为19(retention+ level 0 interval+1=14+4+1=19) -- 即极限情况下,keep time=保留策略+全备时间间隔+1天 alter system set control_file_record_keep_time=19 scope=both; ``` ## 四、备份脚本 ### 4.1 Level 0 批处理 > 设置系统时间格式YYYY-MM-DD, HH:SS > 设置ORACLE_SID,或设置在变量环境中 > 删除15天以上的备份日志 *<span style='color:green'>Win_RMAN_Backup_Level_0.bat</span>* 内容 ```bash @echo off echo ================================================ echo Name :RMAN_Backup_Level_0 Batchfile echo Platform:Windows echo Version :Oracle 12cR1 echo Date :YYYY-MM-DD HH:MM:SS echo ================================================ echo ===!Excute RMAN Level 0 BACKUP!================= echo ===!!Do Not Kill This Windows!!================= echo ===!Running...... !================= echo ================================================ set ORACLE_SID=mcrspos if not exist "D:\RMAN_Backup\Data" md "D:\RMAN_Backup\Data" if not exist "D:\RMAN_Backup\Controlfile" md "D:\RMAN_Backup\Controlfile" if not exist "D:\RMAN_Backup\Archivelog" md "D:\RMAN_Backup\Archivelog" if not exist "D:\RMAN_Backup\Log" md "D:\RMAN_Backup\Log" forfiles /p D:\RMAN_Backup\Log /m *.*log /d -15 /c "cmd /c del @path" IF "%Time:~0,1%"==" " Set "Time=0%Time:~1%" set date=%Date:~0,4%%Date:~5,2%%Date:~8,2%_%Time:~0,2%%Time:~3,2%%Time:~6,2% 2>nul rman target / cmdfile RMAN_Backup_Level_0.rcv log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_0__%date%.log' ``` ### 4.2 Level 0 备份脚本 *<span style='color:green'>Win_RMAN_Backup_Level_0.rcv</span>* 内容 ```sql_more sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"'; sql 'alter system set control_file_record_keep_time=19 scope=both'; run{ configure backup optimization on; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to 'D:\RMAN_Backup\Controlfile\%F'; configure retention policy to recovery window of 14 days; backup as compressed backupset incremental level 0 database format 'D:\RMAN_Backup\Data\RMAN_Backup_Level_0_%d_%T_%s_%p.bak' tag='Level_0' plus archivelog format 'D:\RMAN_Backup\Archivelog\Arch_Level_0_%d_%T_%s_%p.log' delete all input skip inaccessible; } list backup; report obsolete; delete noprompt obsolete; crosscheck backup; delete noprompt expired backup; list backup summary; exit; ``` ### 4.3 Level 1 批处理 *<span style='color:green'>Win_RMAN_Backup_Level_1.bat</span>* 内容 ```bash @echo off echo ================================================ echo Name :RMAN_Backup_Level_1 Batchfile echo Platform:Windows echo Version :Oracle 12cR1 echo Date :YYYY-MM-DD HH:MM:SS echo ================================================ echo ===!Excute RMAN Level 1 BACKUP!================= echo ===!!Do Not Kill This Windows!!================= echo ===!Running...... !================= echo ================================================ set ORACLE_SID=mcrspos if not exist "D:\RMAN_Backup\Data" md "D:\RMAN_Backup\Data" if not exist "D:\RMAN_Backup\Controlfile" md "D:\RMAN_Backup\Controlfile" if not exist "D:\RMAN_Backup\Archivelog" md "D:\RMAN_Backup\Archivelog" if not exist "D:\RMAN_Backup\Log" md "D:\RMAN_Backup\Log" forfiles /p D:\RMAN_Backup\Log /m *.*log /d -15 /c "cmd /c del @path" IF "%Time:~0,1%"==" " Set "Time=0%Time:~1%" set date=%Date:~0,4%%Date:~5,2%%Date:~8,2%_%Time:~0,2%%Time:~3,2%%Time:~6,2% 2>nul rman target / cmdfile RMAN_Backup_Level_1.rcv log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_1__%date%.log' ``` ### 4.4 Level 1 备份脚本 *<span style='color:green'>Win_RMAN_Backup_Level_1.rcv</span>* 内容 ```sql_more sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"'; sql 'alter system set control_file_record_keep_time=19 scope=both'; run{ configure backup optimization on; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to 'D:\RMAN_Backup\Controlfile\%F'; configure retention policy to recovery window of 14 days; backup as compressed backupset incremental level 1 database format 'D:\RMAN_Backup\Data\RMAN_Backup_Level_1_%d_%T_%s_%p.bak' tag='Level_1' plus archivelog format 'D:\RMAN_Backup\Archivelog\Arch_Level_1_%d_%T_%s_%p.log' delete all input skip inaccessible; } list backup; report obsolete; delete noprompt obsolete; crosscheck backup; delete noprompt expired backup; list backup summary; exit; ``` ## 五、Windows任务计划 > windows添加每日02:00备份计划任务 # Part 2:RMAN备份计划: Windows (Catalog) ## 一、环境 ### 1.1 连接目标库和辅助库 > ```bash > target database :windows -oracle- mcrspos > catalog database :windows -oracle- orcl12c > ``` ### 1.2 确保tnsping ```bash # 确保目录库辅助库都能tnsping两个SID C:\Users\Administrator>tnsping mcrspos C:\Users\Administrator>tnsping orcl12c ``` ## 二、目录库配置 ### 2.1 创建目录库所用表空间 ```sql_more C:\Users\Administrator>sqlplus sys/Password#1@orcl12c as sysdba SQL> create tablespace recovery_catalog datafile 'D:\app\orcl\oradata\orcl12c\recovery_catalog.dbf'size 100m autoextend on; Tablespace created. ``` ### 2.2 创建RMAN用户并授权 ```sql_more SQL> create user rman identified by rman default tablespace recovery_catalog; SQL> grant resource,unlimited tablespace,recovery_catalog_owner to rman; Grant succeeded. ``` ### 2.3 连接目标库和目录库 ```sql_more C:\Users\Administrator> rman target / catalog rman/rman@orcl12c Recovery Manager: Release 12.1.0.2.0 - Production on Mon Nov 16 23:11:45 2020 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: MCRSPOS (DBID=1576583420) connected to recovery catalog database ``` ### 2.4 创建恢复目录 ```sql_more RMAN> create catalog; recovery catalog created ``` ### 2.5 注册目标库 ```sql_more RMAN> register database; database registered in recovery catalog starting full resync of recovery catalog ``` ## 三、备份脚本 *<span style='color:green'>Win_RMAN_Backup_Level_0.bat</span>* ```sql rman target / cmdfile RMAN_Backup_Level_0.rvc log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_0__%date%.log' 只需修改为增加target连接catalog rman target / catalog rman/rman@orcl12c cmdfile RMAN_Backup_Level_0.rvc log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_0__%date%.log' ``` <span style='color:green'>Win_RMAN_Backup_Level_1.bat</span> ```sql rman target / cmdfile RMAN_Backup_Level_1.rvc log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_1__%date%.log' 只需修改为增加target连接catalog rman target / catalog rman/rman@orcl12c cmdfile RMAN_Backup_Level_1.rvc log 'D:\RMAN_Backup\Log\RMAN_Backup_Level_1__%date%.log' ``` ## 四、备份测试 ### Target上list backup ```sql RMAN>list backup; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 611 1.11M DISK 00:00:00 20-DEC-20 BP Key: 611 Status: AVAILABLE Compressed: YES Tag: TAG20201220T010459 Piece Name: D:\RMAN_BACKUP\ARCHIVELOG\ARCH_LEVEL_0_MCRSPOS_20201220_726_1.LOG List of Archived Logs in backup set 611 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 652 18419149 20-DEC-20 18421555 20-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 612 Incr 0 2.45G DISK 00:07:06 20-DEC-20 BP Key: 612 Status: AVAILABLE Compressed: YES Tag: LEVEL_0 Piece Name: D:\RMAN_BACKUP\DATA\RMAN_BACKUP_LEVEL_0_MCRSPOS_20201220_727_1.BAK List of Datafiles in backup set 612 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- …… …… BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 613 1.11M DISK 00:00:00 20-DEC-20 BP Key: 613 Status: AVAILABLE Compressed: YES Tag: TAG20201220T011216 Piece Name: D:\RMAN_BACKUP\ARCHIVELOG\ARCH_LEVEL_0_MCRSPOS_20201220_728_1.LOG List of Archived Logs in backup set 613 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 653 18421555 20-DEC-20 18423566 20-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 614 Full 14.73M DISK 00:00:00 20-DEC-20 BP Key: 614 Status: AVAILABLE Compressed: NO Tag: TAG20201220T011217 Piece Name: D:\RMAN_BACKUP\CONTROLFILE\C-3772471526-20201220-01 SPFILE Included: Modification time: 20-DEC-20 SPFILE db_unique_name: MCRSPOS Control File Included: Ckp SCN: 18423577 Ckp time: 20-DEC-20 ``` ### Catalog上list backup ```sql RMAN>list backup; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3389 1.11M DISK 00:00:00 20-DEC-20 BP Key: 3390 Status: AVAILABLE Compressed: YES Tag: TAG20201220T010459 Piece Name: D:\RMAN_BACKUP\ARCHIVELOG\ARCH_LEVEL_0_MCRSPOS_20201220_726_1.LOG List of Archived Logs in backup set 3389 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 652 18419149 20-DEC-20 18421555 20-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 3438 Incr 0 2.45G DISK 00:07:06 20-DEC-20 BP Key: 3442 Status: AVAILABLE Compressed: YES Tag: LEVEL_0 Piece Name: D:\RMAN_BACKUP\DATA\RMAN_BACKUP_LEVEL_0_MCRSPOS_20201220_727_1.BAK List of Datafiles in backup set 3438 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- …… …… BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3439 1.11M DISK 00:00:00 20-DEC-20 BP Key: 3443 Status: AVAILABLE Compressed: YES Tag: TAG20201220T011216 Piece Name: D:\RMAN_BACKUP\ARCHIVELOG\ARCH_LEVEL_0_MCRSPOS_20201220_728_1.LOG List of Archived Logs in backup set 3439 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 653 18421555 20-DEC-20 18423566 20-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 3440 Full 14.73M DISK 00:00:00 20-DEC-20 BP Key: 3444 Status: AVAILABLE Compressed: NO Tag: TAG20201220T011217 Piece Name: D:\RMAN_BACKUP\CONTROLFILE\C-3772471526-20201220-01 SPFILE Included: Modification time: 20-DEC-20 SPFILE db_unique_name: MCRSPOS Control File Included: Ckp SCN: 18423577 Ckp time: 20-DEC-20 ``` # Part 3:RMAN备份计划: Linux (单机) ## 一、变量环境 ```bash [oracle@klaus ~]$ more /home/oracle/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH export EDITOR=vi export ORACLE_SID=orcl export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib export PATH=/u01/app/oracle/product/12.1.0/dbhome_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin export PATH=$ORACLE_HOME/bin:$PATH export NLS_LANG=AMERICAN export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' ``` ## 二、日志归档 ## 三、目录及授权 ```bash # 创建目录 # /data 备份数据库文件 # /log 备份日志 # /archivelog 备份归档日志 # /controlfile 备份控制文件 # /rman_scripts 备份脚本 [oracle@klaus ~]$ cd /u01/app/oracle [oracle@klaus oracle]$ mkdir -p rman_backup [oracle@klaus oracle]$ mkdir -p rman_backup/data [oracle@klaus oracle]$ mkdir -p rman_backup/log [oracle@klaus oracle]$ mkdir -p rman_backup/archivelog [oracle@klaus oracle]$ mkdir -p rman_backup/controlfile [oracle@klaus oracle]$ mkdir -p rman_backup/rman_scripts ``` ```bash #目录授权 [oracle@klaus oracle]$ chmod 771 -R /u01/app/oracle/rman_backup [oracle@klaus oracle]$ chown -R oracle:oinstall /u01/app/oracle/rman_backup ``` ## 四、备份脚本 > *注意不能将windows编辑的shell脚本直接放入linux中;* > > *因为在dos/window* *下按一次回车键实际上输入的是”* *回车(CR)”* *和“* *换行(LF)”,* *而Linux/unix* *下按一次回车键只输入“* *换行(LF)”,* *所以修改的sh* *文件在每行都会多了一个CR,* *在Linux**下运行时就会报错找不到命令* > >> *Lunix中直接vi创建shell脚本* >> Windows中通过notpad++等工具转换格式** >> ### 4.1 Level 0 shell 脚本 ```bash [oracle@klaus rman_scripts]$ vi /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_0.sh export ORACLE_SID=orcl source /home/oracle/.bash_profile find /u01/app/oracle/rman_backup/log/ -mtime +0 -name "*.log*" -exec rm -rf {} \; rman target / log=/u01/app/oracle/rman_backup/log/level_0_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF run{ sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"'; sql 'alter system set control_file_record_keep_time=19 scope=both'; configure backup optimization on; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to '/u01/app/oracle/rman_backup/controlfile/%F'; configure retention policy to recovery window of 14 days; backup as compressed backupset incremental level 0 database format '/u01/app/oracle/rman_backup/data/rman_backup_level_0_%d_%T_%s_%p.bak' tag='Level_0' plus archivelog format '/u01/app/oracle/rman_backup/archivelog/arch_level_0_%d_%T_%s_%p.log' delete all input skip inaccessible; } list backup; report obsolete; delete noprompt obsolete; crosscheck backup; delete noprompt expired backup; list backup summary; exit; EOF ``` ### 4.2 Level 1 shell 脚本 ```bash [oracle@klaus rman_scripts]$ vi /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_1.sh export ORACLE_SID=orcl source /home/oracle/.bash_profile find /u01/app/oracle/rman_backup/log/ -mtime +0 -name "*.log*" -exec rm -rf {} \; rman target / log=/u01/app/oracle/rman_backup/log/level_1_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF run{ sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"'; sql 'alter system set control_file_record_keep_time=19 scope=both'; configure backup optimization on; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to '/u01/app/oracle/rman_backup/controlfile/%F'; configure retention policy to recovery window of 14 days; backup as compressed backupset incremental level 1 database format '/u01/app/oracle/rman_backup/data/rman_backup_level_1_%d_%T_%s_%p.bak' tag='Level_0' plus archivelog format '/u01/app/oracle/rman_backup/archivelog/arch_level_1_%d_%T_%s_%p.log' delete all input skip inaccessible; } list backup; report obsolete; delete noprompt obsolete; crosscheck backup; delete noprompt expired backup; list backup summary; exit; EOF ``` ## 五、定时任务计划 ### 5.1 一周备份 ```bash 周日: 0级增量备份 周一: 1级增量备份 周二: 1级增量备份 周三: 1级增量备份 周四: 0级增量备份 周五: 1级增量备份 周六: 1级增量备份 ``` ### 5.2 任务计划指令 ```powershell [oracle@klaus ~]$ cat /etc/crontab # m h dom mon dow command # 分钟 小时 某天 某月 星期几 命令 ``` ### 5.3 任务计划服务 ```powershell [oracle@klaus ~]$ service crond status Redirecting to /bin/systemctl status crond.service . crond.service - Command Scheduler Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-12-20 01:49:23 CST; 21h ago Main PID: 1147 (crond) Tasks: 1 CGroup: /system.slice/crond.service └─1147 /usr/sbin/crond -n ``` ### 5.4 添加任务计划 ```powershell [oracle@klaus ~]$ crontab -e 0 2 * * 0,4 /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_0.sh 0 2 * * 1,2,3,5,6 /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_1.sh ``` ### 5.4 重启服务 ```powershell [oracle@klaus ~]$ service crond restart ``` ### 5.5 查看计划 ```powershell [oracle@klaus ~]$ crontab -l 0 2 * * 0,4 /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_0.sh 0 2 * * 1,2,3,5,6 /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_1.sh ``` # Part 4:RMAN备份计划: Linux (Catalog) > **相同方法设置连接catalog database** ## 一、备份脚本 ```powershell [oracle@klaus rman_scripts]$ vi /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_0.sh rman target / log=/u01/app/oracle/rman_backup/log/level_0_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF # 只需修改为增加target连接catalog rman target / catalog rman/rman@orcl12c log=/u01/app/oracle/rman_backup/log/level_0_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF [oracle@klaus rman_scripts]$ vi /u01/app/oracle/rman_backup/rman_scripts/linux_rman_backup_level_1.sh rman target / log=/u01/app/oracle/rman_backup/log/level_1_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF # 只需修改为增加target连接catalog rman target / catalog rman/rman@orcl12c log=/u01/app/oracle/rman_backup/log/level_1_$(date +%Y-%m-%d-%H:%M:%S).log <<EOF ``` ## 二、测试 **Target上list backup** ```powershell RMAN>list backup; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ ------------------- 208 25.00K DISK 00:00:00 2020-12-21 01:14:21 BP Key: 208 Status: AVAILABLE Compressed: YES Tag: TAG20201221T011421 Piece Name: /u01/app/oracle/rman_backup/archivelog/arch_level_0_ORCL_20201221_211_1.log List of Archived Logs in backup set 208 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- ------------------- ---------- --------- 1 105 15818195 2020-12-21 01:07:18 15818569 2020-12-21 01:14:20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 209 Incr 0 354.95M DISK 00:00:36 2020-12-21 01:14:58 BP Key: 209 Status: AVAILABLE Compressed: YES Tag: LEVEL_0 Piece Name: /u01/app/oracle/rman_backup/data/rman_backup_level_0_ORCL_20201221_212_1.bak List of Datafiles in backup set 209 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- …… …… BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ ------------------- 210 18.00K DISK 00:00:00 2020-12-21 01:15:07 BP Key: 210 Status: AVAILABLE Compressed: YES Tag: TAG20201221T011507 Piece Name: /u01/app/oracle/rman_backup/archivelog/arch_level_0_ORCL_20201221_213_1.log List of Archived Logs in backup set 210 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- ------------------- ---------- --------- 1 106 15818569 2020-12-21 01:14:20 15818619 2020-12-21 01:15:07 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 211 Full 10.14M DISK 00:00:00 2020-12-21 01:15:08 BP Key: 211 Status: AVAILABLE Compressed: NO Tag: TAG20201221T011508 Piece Name: /u01/app/oracle/rman_backup/controlfile/c-1576583420-20201221-05 SPFILE Included: Modification time: 2020-12-21 01:14:20 SPFILE db_unique_name: ORCL Control File Included: Ckp SCN: 15818630 Ckp time: 2020-12-21 01:15:08 ``` **Catalog上list backup** ```powershell RMAN>list backup; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 4348 25.00K DISK 00:00:00 21-DEC-20 BP Key: 4352 Status: AVAILABLE Compressed: YES Tag: TAG20201221T011421 Piece Name: /u01/app/oracle/rman_backup/archivelog/arch_level_0_ORCL_20201221_211_1.log List of Archived Logs in backup set 4348 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 105 15818195 21-DEC-20 15818569 21-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 4349 Incr 0 354.95M DISK 00:00:36 21-DEC-20 BP Key: 4353 Status: AVAILABLE Compressed: YES Tag: LEVEL_0 Piece Name: /u01/app/oracle/rman_backup/data/rman_backup_level_0_ORCL_20201221_212_1.bak List of Datafiles in backup set 4349 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- …… …… BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 4350 18.00K DISK 00:00:00 21-DEC-20 BP Key: 4354 Status: AVAILABLE Compressed: YES Tag: TAG20201221T011507 Piece Name: /u01/app/oracle/rman_backup/archivelog/arch_level_0_ORCL_20201221_213_1.log List of Archived Logs in backup set 4350 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 106 15818569 21-DEC-20 15818619 21-DEC-20 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 4351 Full 10.14M DISK 00:00:00 21-DEC-20 BP Key: 4355 Status: AVAILABLE Compressed: NO Tag: TAG20201221T011508 Piece Name: /u01/app/oracle/rman_backup/controlfile/c-1576583420-20201221-05 SPFILE Included: Modification time: 21-DEC-20 SPFILE db_unique_name: ORCL Control File Included: Ckp SCN: 15818630 Ckp time: 21-DEC-20 ``` # Part 5:RMAN备份计划: Linux (RAC) 最后修改:2022 年 04 月 04 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏