运维联盟俱乐部

 找回密码
 立即注册
查看: 1452|回复: 0

[备份恢复] restore archivelog

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2021-9-8 09:18:48 | 显示全部楼层 |阅读模式
    备份所有归档日志文件
    RMAN> backup archivelog all delete input;

    第一: restore archivelog 的各种选项
    1.restore archivelog all   恢复全部归档日志文件
    RMAN> restore archivelog all;

    2.只恢复 5到8这四个归档日志文件
    RMAN> restore archivelog from logseq 5 until logseq 8;

    3.恢复从第5个归档日志起
    RMAN> restore archivelog from logseq 5;

    4.恢复7天内的归档日志
    RMAN> restore archivelog from time 'sysdate-7';

    5. sequence between 写法
    RMAN> restore archivelog sequence between 1 and 3;

    6.恢复到哪个日志文件为止
    RMAN> restore archivelog until logseq 3;

    7.从第五个日志开始恢复
    RMAN> restore archivelog low logseq 5;

    8.到第5个日志为止
    RMAN> restore archivelog high logseq 5;

    如果想改变恢复到另外路径下 则可用下面语句
    set archivelog destination to 'd:\backup';
    RMAN> run
    {allocate channel ci type disk;
    set archivelog destination to 'd:\backup';
    restore archivelog all;
      release channel ci;
    }
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 14:43 , Processed in 0.045167 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表