• atwiki
  • Choc-Net!
  • 【amanda】リカバリツールの利用方法(amrecover)

Choc-Net!

【amanda】リカバリツールの利用方法(amrecover)

最終更新:

choc-net

- view
管理者のみ編集可

【amanda】リカバリツールの利用方法(amrecover)


前提条件


バックアップを取る際に、amanda.confの''dump typeにてOption index''を追記する必要がある。

起動方法

  • 起動コマンド
# amrecover -C DailySet1 -s localhost -t localhost -d /dev/st0
補足

-C バックアップに使ったセッティングを指定。
-s ファイルのインデックスを持っているサーバ名を指定。
-t テープドライブが繋がっているサーバ名を指定。
-d テープドライブのデバイス名を指定。
''-s -t'' 同じサーバ名を指定(別サーバになることはあるのか?)
    • 実行例

# ''amrecover -C DailySet1 -s localhost -t localhost -d /dev/st0''
AMRECOVER Version 2.4.4p1. Contacting server on localhost ...
220 pc_name1 AMANDA index server (2.4.4p1) ready.
200 Access OK
Setting restore date to today (2006-01-19)
200 Working date set to 2006-01-19.
200 Config set to DailySet1.
501 Host pc_name1 is not in your disklist.
Trying host pc_name1 ...
501 Host pc_name1 is not in your disklist.
amrecover>

リカバリ方法

  1. ダンプホストの指定
amrecover> sethost localhost
実行例

amrecover> ''sethost localhost''
200 Dump host set to localhost.
  1. ディレクトリ(デバイス名の指定)
amrecover> setdisk /etc
補足
ディレクトリ(デバイス名)は、disklistに書かれているパス(デバイス)を指定。
実行例

amrecover> ''setdisk /etc''
Scanning /backup...
200 Disk set to /etc.
  1. 戻したい日付
amrecover> setdate 2006-01-18
実行例

amrecover> ''setdate 2006-01-18''
200 Working date set to 2006-01-18.
  1. テープ内のファイルをリスト
amrecover> ls
実行例

amrecover> ''ls''
2006-01-18 .
2006-01-18 .pwd.lock
2006-01-18 DIR_COLORS
2006-01-18 DIR_COLORS.xterm
2006-01-18 FreeWnn/
~以降省略~
  1. テープ内のディレクトリを移動
amrecover> cd amanda/DailySet1
実行例

amrecover> cd amanda/DailySet1
/etc/amanda/DailySet1
  1. ローカルのディレクトリ移動
amrecover> lcd /etc/
実行例

amrecover> lcd /etc/amanda/DailySet1/
特に何も出力されない。
  1. リストア対象ファイルの追加
amrecover> add amanda.conf.20051215
実行例

amrecover> add amanda.conf.20051215
Added /amanda/DailySet1/amanda.conf.20051215
  1. リストア対象のリスト
amrecover> list
実行例

amrecover> list
TAPE pc_name1_01 LEVEL 0 DATE 2006-01-18
       /amanda/DailySet1/amanda.conf.20051213
       /amanda/DailySet1/amanda.conf.20051215
  • リストア実行
amrecover> extract
実行例

amrecover> extract

Extracting files using tape drive /dev/st0 on host localhost.
The following tapes are needed: pc_name1_01

Restoring files into directory /etc
Continue [?/Y/n]?

Extracting files using tape drive /dev/st0 on host localhost.
Load tape pc_name1_01 now
Continue [?/Y/n/s/t]?
./amanda/DailySet1/amanda.conf.20051213
./amanda/DailySet1/amanda.conf.20051215
  • ツールの終了
amrecover> exit
  • ヘルプの参照
amrecover> ?


タグ: Linux amanda バックアップ
最終更新日付: 2008年03月01日 (土) 00時18分37秒
記事メニュー
目安箱バナー