Avamar:如何还原 Oracle 归档日志序列

Summary: 要使用 Avamar 还原 Oracle 归档日志序列,请执行以下步骤:使用 RMAN 命令“list backup”找到归档日志备份片段的名称和序列号。更新 Avtar 标记文件或使用备份编号发送语句,然后保存。验证标记文件是否正常工作。使用 RMAN 脚本还原一个或多个归档日志序列。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

要使用 Avamar 还原 Oracle 归档日志序列,请执行以下步骤:

  1. 使用 RMAN 命令找到归档日志备份片段名称和此备份片段的序列号:

    RMAN> list backup;

  2. 在 Avamar GUI 中找到需要还原的匹配归档日志备份片段的备份编号。将 Avamar 中的备份日期与 RMAN 列表备份输出匹配。

  3. 通过添加以下参数,更新 Avtar 标志文件(选项 1 和 2)或在 send 语句中(选项 3)。将备份编号的值放入该参数中,然后保存标记文件。此示例使用备份编号 25:

    --incpartials
    --labelnum=25

  4. 使用以下命令验证 Avtar 标记文件是否正常工作:

    /usr/local/avamar/bin/avtar --backups --flagfile=/usr/local/avamar/var/avtar-flags.txt

  5. 纠正所有问题,然后再继续将其用于还原。

  6. 下面是两个示例脚本:

  7. 根据这两个脚本,根据环境设置这两个参数中的值,“--prefix=oraver/sid/”,即 12c = 12,11g = 11g。然后 --flagfile= 参数应指向有效的 avtar 标记文件,以下路径和名称只是一个示例:

    --prefix=12/orcl/

  8. 还原一个序列号:

    run { allocate channel c1 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so"; send '"--prefix=12/orcl/" "--flagfile=/usr/local/avamar/var/avtar-flags.txt" "--bindir=/usr/local/avamar/bin" "--logfile=/tmp/archivelog_restore.log"'; set archivelog destination to '/tmp/'; # <-- set this path to whatever you wish. This is the target path where RMAN will restore the files too. restore archivelog sequence 10; release channel c1; }

  9. 还原归档日志序列:

    run { allocate channel c1 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so"; send '"--prefix=12/orcl/" "--flagfile=/usr/local/avamar/var/avtar-flags.txt" "--bindir=/usr/local/avamar/bin" "--logfile=/tmp/archivelog_restore.log"'; set archivelog destination to '/tmp/'; # <-- set this path to whatever you wish. This is the target path where RMAN will restore the files too. restore archivelog from sequence 10 until sequence 20; release channel c1; }

  10. 在 send 语句中使用 --labelnumber(而不是 avtar 标记文件)还原一个序列号:

    run { allocate channel c1 type sbt PARMS="SBT_LIBRARY=/usr/local/avamar/lib/libobk_avamar64.so"; send '"--prefix=12/orcl/" "--flagfile=/usr/local/avamar/var/avtar-flags.txt" "--bindir=/usr/local/avamar/bin" "--logfile=/tmp/archivelog_restore.log" "--labelnumber=25"'; set archivelog destination to '/tmp/'; # <-- set this path to whatever you wish. This is the target path where RMAN will restore the files too. restore archivelog sequence 10; release channel c1; }

  11. 如果由于某种原因遇到问题,请收集以下信息:

    • 标志文件的内容
    • 还原的 RMAN 输出
    • 在 send 语句中使用 --logfile= 配置的日志
    • 从 RMAN 运行命令“list backup archive all”的输出,显示所需的还原顺序

Affected Products

Avamar, Avamar Client, Avamar Plug-in for Oracle
Article Properties
Article Number: 000240231
Article Type: How To
Last Modified: 28 Oct 2024
Version:  1
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.