SnapManager Oracle
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

建立還原規格

貢獻者

還原規格檔案是XML檔案、其中包含可從中還原檔案的原始和替代位置。使用此規格檔案從指定位置還原檔案。SnapManager

您可以使用任何文字編輯器來建立還原規格檔案。您必須為檔案使用.xml副檔名。

  1. 開啟文字檔。

  2. 輸入下列命令:<ree-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/)或自動儲存管理(ASM)磁碟群組掛載點(例如+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. 輸入下列命令:</還原 規格>

  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>