« showrev -p で出力される各項目の意味 | メイン | fsckでのスーパーブロックの修復 »
1999年12月27日
ufsdump でとったマシンのバックアップを ufsrestore で戻す方法
■ リストア(復元)方法
/, /usr などのシステムのバックアップを戻す手順は次のようになります。
1. OS の CD-ROM から boot します。
ok boot cdrom
2. 自動的に OpenWindows が起動されますが、ここで suninstall のウィンドウは
無視して、ワークスペースのメニューからコマンドツール(cmdtool)を起動して
作業を行ないます。
3. 各パーティションに対して newfs コマンドを実行しファイルシステムをクリア
します。
# newfs /dev/rdsk/c0t3d0s0
# fsck /dev/rdsk/c0t3d0s0
4. root パーティションをマウントし、ufsrestore します。
# mount /dev/dsk/c0t3d0s0 /mnt
# cd /mnt
# mt -f /dev/rmt/0 rewind
# ufsrestore rvf /dev/rmt/0
※ root パーティションを restore した時のみ installboot が必要です。
Solaris 2.6 の場合。
# /usr/sibn/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk ¥
/dev/rdsk/c0t3d0s0
# cd /
# umount /mnt
5. 他のファイルシステム(/usr, /opt 等)をマウントし、ufsrestore します。
マウントを行なう前に 3 〜 4 の手順をスライスを変えて同様に行なって下さい。
******** 1本のテープに複数のファイルシステムをバックアップした場合:*********
# mount /dev/dsk/c0t3d0s5 /mnt
# cd /mnt
# mt -f /dev/rmt/0 rewind
# mt -f /dev/rmt/0n fsf 1
# ufsrestore rvf /dev/rmt/0n
# cd /
# umount /mnt
# mount /dev/dsk/c0t3d0s6 /mnt
# cd /mnt
# ufsrestore rvf /dev/rmt/0n
# cd /
# umount /mnt
......
******************************************************************************
6. システムを起動し直します。
Stop + A
ok boot
■ 任意のファイルのみ ufsrestore する方法
( i オプションで対話的に行うことができます。)
sun# ufsrestore ivf /dev/rmt/0
restore > ?
:
restore > ls
dir2/
restore > cd dir2
restore > ls
aaa bbb ccc
restore > add aaa
restore > ls
*aaa bbb ccc ← 指定されたファイルに * がつく
restore > extract
Extract requested files
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
extract file xxxxxxxxxx
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] y
restore > quit
投稿者 AJ : 1999年12月27日 11:25
トラックバック
このエントリーのトラックバックURL:
http://www.factory-aj.com/cgi/mtctrl/mt-tb.cgi/130