ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rac备份之归档raw设备

rac备份之归档raw设备

原创 Linux操作系统 作者:ly_nye 时间:2012-01-06 17:01:01 0 删除 编辑
由于归档日志不能存放于raw设备,rac环境中归档日志一般存放于本地目录,模拟环境如下;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=/opt/oracle/archivelog/' SID = 'itdb1';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=/opt/oracle/archivelog/' SID = 'itdb2';
任意节点执行
执行备份:
run
{
allocate channel c1 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb1;
allocate channel c2 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb2;
backup database plus archivelog;
}
 
恢复方法:
srvctl stop database -d itdb
节点1:
rman target /
startup mount
节点2:
rman target /
startup mount
 
任意节点执行:
还原数据库
run
{
allocate channel c1 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb1;
allocate channel c2 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb2;
restore database;
}
还原归档
run
{
allocate channel c1 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb1;
allocate channel c2 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb2;
restore (archivelog sequence between m and n thread 1)
(archivelog sequence between m and n thread 2);
}
拷贝节点2上的归档日志到节点1上
scp node2:/opt/oracle/archivelog/* node1:/opt/oracle/archivelog/
 
恢复数据库
run
{
allocate channel c1 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb1;
allocate channel c2 device type disk format '/opt/oracle/%U' connect sys/oracle@itdb2;
recover database;
}
 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10513540/viewspace-714548/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: rac备份之归档asm
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2008-08-13

  • 博文量
    2
  • 访问量
    9312