次に説明する手順は、Backup サーバーだけにあてはまるものです。その理由は、インデックスと構成ファイルを格納し保守するのはサーバーだけであるからです。/nsr ディレクトリに格納されている Backup インデックスと構成ファイルを復旧するには、mmrecov コマンドを使います。
オペレーティングシステムも Backup ソフトウェアも破壊されている場合は、/nsr ディレクトリの内容を復旧する前に、それらをインストールし直さなければなりません。「システムと Backup ソフトウェアの復旧」を参照してください。
mmrecov コマンドを使って /nsr ディレクトリを復旧する際は、次の 3 つの重要なディレクトリの内容を復旧します。
/nsr/mm (メディアマネージャ) ディレクトリ - すべての Backup バックアップボリュームとそのセーブセットを追跡するための Backup メディアインデックスが格納されています。
/nsr/index/server-name ディレクトリ - サーバーインデックスが格納されており、その中に、障害発生前にバックアップされていたすべてのサーバーファイルのリストが記載されています。
サーバーインデックスには、クライアントインデックスの場所、復旧方法などの、クライアントインデックスについての情報が記載されています。サーバーインデックスを復旧し終わったら、nwrecover プログラムを使ってクライアントインデックスを復旧することができます。
/nsr/resディレクトリ - 特殊な Backup 構成ファイルが格納されています。
nsr.res ファイルには、そのサーバーに属するクライアントのリスト、カスタマイズされたクライアントの構成または選択内容、デバイス情報、登録情報が記載されています。nsrjb.res ファイルには、ジュークボックス内のバックアップボリュームの位置と、ラベルテンプレートについての情報が記載されています。インデックスと違って、このディレクトリの内容は、Backup の稼動中は正確に上書きされません。したがって、mmrecov コマンドによって、/nsr/res ディレクトリは、あとで名前の変更を行う /nsr/res.R ディレクトリとして復旧されます。
mmrecov コマンドは、/nsr ディレクトリにある Backup のサーバーインデックスと構成ファイルを復旧するのに使います。この節の説明は、Backup サーバーだけにあてはまります。
mmrecov コマンドを入力すると、ブートストラップのセーブセット識別番号 (ssid またはセーブセット ID) をユーザーに尋ねてきます。重要なデータの消失に備えて推奨された方法に従っていれば、必要なバックアップメディアの名前とブートストラップの ssid を示したブートストラップファイルのコピーが、ハードコピーまたは電子的ファイルのどちらかで保存されています。mmrecov コマンドは、ルートディレクトリ (/) ではなく、ほかのディレクトリで実行してください。
次の例では、17851237 という ssid が、前回のバックアップ処理でのブートストラップのセーブセット識別番号です。
Jun 17 22:21 1997 mars's Backup bootstrap information date time level ssid file record volume 6/14/92 23:46:13 full 17826163 48 0 mars.1 6/15/92 22:45:15 9 17836325 87 0 mars.2 6/16/92 22:50:34 9 17846505 134 0 mars.2 6/17/92 22:20:25 9 17851237 52 0 mars.3 |
この情報がない場合は、scanner -B コマンドを使って ssid を探し、インデックスを復旧できます。「ブートストラップのセーブセット ID」を参照してください。
オペレーティングシステムと Backup ソフトウェアを正常にインストールしたら、次の手順で、バックアップメディアからインデックスと構成ファイルを復旧します。
ブートストラップ情報を探します。
この情報は、次の手順で必要です。
bootstrap という名前の付いた前回のバックアップが格納されたバックアップメディアを、ストレージデバイスに装着します。
mmrecov コマンドを使って、ブートストラップバックアップの内容を抽出します。mmrecov コマンドは、ルートディレクトリ (/) ではなく、ほかのディレクトリで実行してください。
次に例を示します。
# mmrecov mmrecov: Using mars.sun.com as server NOTICE: mmrecov is used to recover the Backup server's on-line file and media indexes from media (backup tapes or disks) when either of the server's on-line file or media index has been lost or damaged. Note that this command will OVERWRITE the server's existing on- line file and media indexes. mmrecov is not used to recover Backup clients' on-line indexes; normal recover procedures may be used for this purpose. See the mmrecov(8) and nsr_crash(8) man pages for more details. Enter the latest bootstrap save set id []: 17851237 Enter starting file number (if known) [0]: 52 Enter starting record number (if known) [0]: 0 Please insert the volume on which save set id 17851237 started into /disk1/file.tape. When you have done this, press <RETURN>: Scanning /disk1/file.tape for save set 17851237; this may take a while... scanner: scanning file disk file.tape on /disk1/file.tape scanner: ssid 17851237: scan complete scanner: ssid 17851237: 28 KB, 11 file(s) /nsr/res/nsr.res /nsr/res/nsr.res: file exists, overwriting /nsr/res/nsrjb.res /nsr/res/nsrjb.res: file exists, overwriting /nsr/res/nsrla.res /nsr/res/nsrla.res: file exists, overwriting /nsr/res/ /nsr/mm/ /nsr/index/mars.sun.com/ /nsr/index/ /nsr/ / # nsrmmdbasm -r /nsr/mm/mmvolume/ nsrindexasm -r /nsr/index/mars.sun.com/db/ /disk1/file.tape: mount operation in progress mars.sun.com: 7 records recovered, 0 discarded. /disk1/file.tape: mounted file disk file.tape The bootstrap entry in the on-line index for mars.sun.com has been recovered. The complete index is now being reconstructed from the various partial indexes which were saved during the normal save for this server. |
If your resource files were lost, they are now recovered in the 'res.R' directory. Copy or move them to the 'res' directory, after the index has been reconstructed and you have shut down the daemons. Then restart the daemons. Otherwise, just restart the daemons after the index has been reconstructed. nsrindexasm: Pursuing index pieces of /nsr/index/mars.sun.com/db from mars.sun.com. Recovering files into their original locations. nsrindexasm -r ./mars.sun.com/db/ merging with existing mars.sun.com index mars.sun.com: 753 records recovered, 0 discarded. Received 1 matching file(s) from NSR server `mars.sun.com' Recover completion time: Wed Jan 28 08:37:38 1998 The index for `mars.sun.com' is now fully recovered. |
インデックスと構成ファイルの復旧中に、たとえば nsrwatch または nwadmin といった Backup のコマンドを使って、サーバーでの復旧の進行状況を監視できます。mmrecov コマンドの出力が nsrwatch コマンドの出力の先頭に出力されないように、新しいウィンドウ (シェルツール) を開き、このウィンドウ上で復旧処理を監視します。次に例を示します。
mars# nsrwatch Server: mars.sun.com Wed Jan 28 08:53:54 1998 Up since: Wed Jan 28 08:35:15 1998 Version: Backup 5.1.Build.63 Eval Saves: 0 session(s) Recovers: 1 session(s), 131 KB total Device type volume Disk1/file.tape file file.tape reading, done Sessions: Messages: Wed 08:35:11 server notice: started Wed 08:35:22 index notice: completed checking 1 client(s) Wed 08:36:44 /disk1/file.tape mount operation in progress Wed 08:36:48 /disk1/file.tape mounted file disk file.tape Wed 08:37:36 /disk1/file.tape mounted file disk file.tape Wed 08:37:36 mars.sun.com:/nsr/index/mars.sun.com (1/28/98) starting read from file.tape of 131 KB Wed 08:37:37 mars.sun.com:/nsr/index/mars.sun.com (1/28/98) done reading 1 31 KB Pending: |