SnapManager Oracle
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

正在创建还原规范

贡献者

还原规范文件是一个 XML 文件,其中包含可从中还原文件的原始位置和备用位置。SnapManager 使用此规范文件从指定位置还原文件。

您可以使用任何文本编辑器创建还原规范文件。您必须对文件使用 .xml 扩展名。

  1. 打开文本文件。

  2. 输入以下内容: <restore-specification xmlns="http://www.netapp.com">

  3. 使用以下示例中所示的格式输入任何文件映射信息:

    <file-mapping>
        <original-location>/path/dbfilename.dbf</original-location>
        <alternate-location>/path/dbfilename1.dbf</alternate-location>
    </file-mapping>

    文件映射指定从何处还原文件。原始位置是指备份时文件在活动文件系统上的位置。备用位置是指从其中还原文件的位置。

  4. 使用示例中所示的格式输入任何挂载的文件系统映射信息:

    <mountpoint-mapping>
         <original-location>/path/db_name</original-location>
         <snapname>snapname</snapname>
         <alternate-location>/path/vaultlocation</alternate-location>
    </mountpoint-mapping>
    <mountpoint-mapping>
         <original-location>+DiskGroup_1</original-location>
         <snapname>snapname</snapname>
         <alternate-location>+DiskGroup_2</alternate-location>
    </mountpoint-mapping>

    mountpoint 是指目录路径 /mnt/myfs/ 或自动存储管理( Automatic Storage Management , ASM )磁盘组 mountpoint (例如 +my_dg )。mountpoint 映射指定从中还原文件的挂载点。原始位置是备份时挂载点在活动文件系统中的位置。备用位置是指用于还原原始位置中文件的挂载点。snapname 是备份原始文件的 Snapshot 副本的名称。

    对于 ASM ,磁盘组名称必须与 SnapManager 为向 RMAN 注册备份而克隆的磁盘组相同。可以通过查看备份属性来获取此名称。

    备注 Snapshot 副本名称是必需的组件,因为同一文件系统可以在一个备份操作中使用多次(例如,一次用于数据文件,一次用于日志)。
  5. 使用示例中所示的格式输入原始设备映射标记和位置:

    <raw-device-mapping>
         <original-location>/path/raw_device_name</original-location>
         <alternate-location>/path/raw_device_name</alternate-location>
    </raw-device-mapping>

    原始设备映射指定恢复原始设备的位置。

  6. 输入以下内容: </restore-specification >

  7. 将此文件另存为 .xml 文件并关闭规范。

还原规范示例

以下示例显示了还原规范结构:

<?xml version="1.0" encoding="UTF-8"?>
<restore-specification xmlns="http://www.netapp.com">
<!-- "Restore from file(s)" -->
     <file-mapping>
          <original-location>/mnt/pathname/dbname/users01.dbf</original-location>
          <alternate-location>/mnt/vault/users01.dbf</alternate-location>
     </file-mapping>
<!-- "Restore from host mounted file system(s)" -->
     <mountpoint-mapping>
          <original-location>/mnt/pathname/dbname/fs</original-location>
          <snapname>Snapshotname</snapname>
          <alternate-location>/mnt/vaultlocation</alternate-location>
     </mountpoint-mapping>
<!-- "Restore from ASM mounted file system(s)" -->
     <mountpoint-mapping>
          <original-location>+DISKGROUP_1</original-location>
          <snapname>snapshotname</snapname>
          <alternate-location>+DISKGROUP_2</alternate-location>
     </mountpoint-mapping>
<!-- "Restore from raw device" -->
     <raw-device-mapping>
          <original-location>/pathname/devicename</original-location>
          <alternate-location>/pathname/devicename</alternate-location>
     </raw-device-mapping>
</restore-specification>