如何做RMAN热备份的恢复

feng3000 2009-06-05 02:06:31
我是用恢复目录做备份的。现在把备份拷贝到其他电脑上做恢复。
现在我不是很清楚,Rman到底是从哪里的备份做恢复???
...全文
134 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
feng3000 2009-06-07
  • 打赏
  • 举报
回复
OK,恢复成功。
但还是有些异常情况的。
例如:
RMAN> recover database ;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "recover": expecting one of: "allocate, alter, "
RMAN-01007: at line 1 column 1 file: standard input
输入recover database,就出现以上错误了。

跳过这一步后,输入RMAN> alter database open resetlogs

数据库成功打开。现在正常使用了。

谢谢各位的帮助和支持。
inthirties 2009-06-06
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 inthirties 的回复:]
引用 2 楼 feng3000 的回复:

以下是我的备份脚本
{
  allocate channel c1 type disk;
  allocate channel c2 type disk;
  allocate channel c3 type disk;
  allocate channel c4 type disk;
  allocate channel c5 type disk;
  allocate channel c6 type disk;
  backup
  tablespace idxspace, system, tools, rbs, temp, users, indx, drsys, webspace
  filesperset = 1
format '/full_db_bk/idx_%d_%s_%p_%t…
[/Quote]

你这在'/full_db_bk/idx_%d_%s_%p_%t'上备份了以上数据文件和control文件,把这些文件可以拷贝到另外的机器上相同的目录,通过RMAN来恢复。

由于要恢复control file,要先在nomount的状态下,恢复controlfile先,然后到mount状态,恢复这些datafile。
inthirties 2009-06-06
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 feng3000 的回复:]
以下是我的备份脚本
{
  allocate channel c1 type disk;
  allocate channel c2 type disk;
  allocate channel c3 type disk;
  allocate channel c4 type disk;
  allocate channel c5 type disk;
  allocate channel c6 type disk;
  backup
  tablespace idxspace, system, tools, rbs, temp, users, indx, drsys, webspace
  filesperset = 1
format '/full_db_bk/idx_%d_%s_%p_%t'
  include current control…
[/Quote]

你这在'/full_db_bk/idx_%d_%s_%p_%t'上备份了以上数据文件和control文件,把这些文件可以拷贝到另外的机器上相同的目录,通过RMAN来恢复。
liuyi8903 2009-06-06
  • 打赏
  • 举报
回复


restore spfile from ...

restore controlfile

mount datbase;

restore database
recover database;

vc555 2009-06-05
  • 打赏
  • 举报
回复
另一台机子把备份放同样的目录
feng3000 2009-06-05
  • 打赏
  • 举报
回复
以下是我的备份脚本
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
backup
tablespace idxspace, system, tools, rbs, temp, users, indx, drsys, webspace
filesperset = 1
format '/full_db_bk/idx_%d_%s_%p_%t'
include current controlfile
tag = 'EXCEPT_DATSPACE_FULL';
sql 'alter system archive log current';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
}

3,491

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧