在备库上进行热备份--10G之前

切换主库日志的脚本 logswitch.sh:

sqlplus -s "sys/<passwd>@<primary_db> as sysdba" <<EOF
alter system archive log current;
exit
EOF

先备份数据库,再运行脚本切换主库的日志,再备份归档日志,具体步骤:

[oracle@dg121-2 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Sep 8 19:19:07 2020

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

connected to target database: ORCL (DBID=1461820645, not open)

RMAN> 
run{
allocate channel c1 type 'sbt_tape' parms='
SBT_LIBRARY=/opt/scutech/dbackup3/lib/libobk.so,
ENV=(URL=http://192.168.87.155:50306/d2/data/0d36020eecec11ea8000b49691622ac4/c7873e9aed0811ea8000b49691622ac4,
EXTRA=X-Access-Key:ea5350ac00fa61d08533a729da808de0)' trace=0;
backup database plus archivelog delete input;
}
RMAN> 2> 3> 4> 5> 6> 7> 

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=363 device type=SBT_TAPE
channel c1: DBackup3 Oracle MMS Library


Starting backup at Sep 08 2020 19:19:14
RMAN-06820: WARNING: failed to archive current log at primary database
ORACLE error from target database: 
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-00942: table or view does not exist
......
RMAN>  host '/home/oracle/logswitch.sh';
System altered.
host command complete


RMAN> 
run{
allocate channel c1 type 'sbt_tape' parms='
SBT_LIBRARY=/opt/scutech/dbackup3/lib/libobk.so,
ENV=(URL=http://192.168.87.155:50306/d2/data/0d36020eecec11ea8000b49691622ac4/c7873e9aed0811ea8000b49691622ac4,
EXTRA=X-Access-Key:ea5350ac00fa61d08533a729da808de0)' trace=0;
backup archivelog all delete input;
}

RMAN> 2> 3> 4> 5> 6> 7> 
released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=363 device type=SBT_TAPE
channel c1: DBackup3 Oracle MMS Library

Starting backup at Sep 08 2020 19:21:41
RMAN-06820: WARNING: failed to archive current log at primary database
ORACLE error from target database: 
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-00942: table or view does not exist

channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=273 RECID=166 STAMP=1050607241
channel c1: starting piece 1 at Sep 08 2020 19:21:41
channel c1: finished piece 1 at Sep 08 2020 19:21:42
piece handle=4uv9tvm5_1_1 tag=TAG20200908T192141 comment=API Version 2.0,MMS Version 8.2.64.76
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: deleting archived log(s)
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/oradata/cdr1/arc/ORCL1BY/archivelog/2020_09_08/o1_mf_1_273_hogt892p_.arc thread=1 sequence=273
Finished backup at Sep 08 2020 19:21:42
released channel: c1

RMAN> 

姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
<p> <b><span style="background-color:#FFE500;">【超实用课程内容】</span></b> </p> <p> <br /> </p> <p> <br /> </p> <p> 本课程内容包含讲解<span>解读Nginx的基础知识,</span><span>解读Nginx的核心知识、带领学员进行</span>高并发环境下的Nginx性能优化实战,让学生能够快速将所学融合到企业应用中。 </p> <p> <br /> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><br /> </b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><span style="background-color:#FFE500;">【课程如何观看?】</span></b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> PC端:<a href="https://edu.csdn.net/course/detail/26277"><span id="__kindeditor_bookmark_start_21__"></span></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 移动端:CSDN 学院APP(注意不是CSDN APP哦) </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 本课程为录播课,课程永久有效观看时长,大家可以抓紧时间学习后一起讨论哦~ </p> <p style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <br /> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <strong><span style="background-color:#FFE500;">【学员专享增值服务】</span></strong> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b>源码开放</b> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 下载方式:电脑登录<a href="https://edu.csdn.net/course/detail/26277"></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a>,播放页面右侧点击课件进行资料打包下载 </p> <p> <br /> </p> <p> <br /> </p> <p> <br /> </p>
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页