
从磁带中恢复文件,给大家参考
下面是从磁带中恢复一个文件的操作示例,是我MV同事教我的。中文是我加的注释。
此文目的,一个是给大家参考,更重要的我是个健忘的人,留下备查。
有不对的地方告诉我为谢。
login the szdev1 (登录相应到服务器)
%su - (切换到根用户)
# cd /export3 (切换到目标盘)
# ls
NB_cat_bck TT_DB home lost+found viewstore z.szdev1.export3
# mkdir temp2007 (建立临时存放文件夹,目的让文件是先放在临时目录,再移到实际的目录)
# cd temp2007 (切换到临时文件夹,从磁带恢复的文件将以此文件夹作存放的启始目录)
# ls
# mt -f /dev/rmt/0cb status (检查磁带机状态)
HP Ultrium LTO 3 tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0
# ps -ef | grep ufs (查看ufs进程运行情况)
root 3863 3735 0 08:48:17 pts/7 0:00 grep ufs
# mt -f /dev/rmt/0cb rew (倒带)
# cat /dev/rmt/0cb (列出磁带机上的文件集)
...
===========================================================
(file-set) (host:/disk) (Device name) (Disk-Use)
...
#7 szdev1:/export3 /dev/dsk/c1t3d0s6 6/70GB
...
===========================================================
# mt -f /dev/rmt/0cbn fsf 7 (转到文件集7)
# ufsrestore -if /dev/rmt/0cbn (进入互动恢复程序 ufsrestore)
ufsrestore > ? (查看能使用的命令)
Available commands are:
ls [arg] - list directory
marked [arg] - list items marked for extraction from directory
cd arg - change directory
pwd - print current directory
add [arg] - add `arg' to list of files to be extracted
delete [arg] - delete `arg' from list of files to be extracted
extract - extract requested files
setmodes - set modes of requested directories
quit - immediately exit program
what - list dump header information
verbose - toggle verbose flag (useful with ``ls'')
paginate - toggle pagination flag (affects ``ls'' and ``marked'')
setpager - set pagination command and arguments
help or `?' - print this list
If no `arg' is supplied, the current directory is used
ufsrestore >ls (查看当前目录下的文件)
ufsrestore > add aifl2.doc (假若要恢复文件aifl2.doc,先加到列表)
ufsrestore >ls (文件前面带*表示要恢复)
ufsrestore > extract aif12.doc (恢复文件aifl2.doc )
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 (磁带号,只有一个磁带,所以选1)
set owner/mode for '.'? [yn] y (当前目录设置)
ufsrestore > quit (退出恢复程序 ufsrestore)
# mt -f /dev/rmt/0cb rew (倒带)
# pwd
/export3/temp2007
# ls
aifl2.doc (文件已恢复到硬盘上临时目录中了)
#
[ 本帖最后由 sheng2006 于 2007-1-5 12:14 编辑 ]
搜索更多相关主题的帖子:
磁带 文件