顺着天性做事,逆着个性做人.
分类: LINUX
2010-05-01 22:13:14
在Linux下如何使用磁带机:
1.识别磁带机:
IDE磁带机识别为/dev/ht0, /dev/hd1或/dev/nht0, /dev/nht1
其他磁带机均识别为/dev/st0, /dev/sd1或/dev/sht0, /dev/sht1 (其中n代表不可倒带(no rewind))
检查是否识别到驱动器:
# cat proc/scsi/scsi
列出如下图的厂商, 型号, 固件版本等等
2.使用mt控制磁带机:
MT的用法: mt [-v] [-h] [ -f device ] command [ count ]
如:
# mt –f /dev/st0 offline 弹出磁带
# mt –f /dev/st0 status 查看状态
# mt –f /dev/st0 erase 擦除磁带
# mt –f /dev/st0 rewind 倒带
3.用tar备份:
# tar cvf /dev/st0 /home 备份/home目录
#tar tvf /dev/st0 校验磁带
#tar xvf /dev/st0 恢复到当前目录
4.用cpio备份:
# find /tmp | cpio –ocv > /dev/st0
# cpio –tvF /dev/st0 校验
Use copy in mode to restore archived data from an archive destination file. The restore will not overwrite files that are more or the same age without a force switch.
# cpio –icv < /dev/st0
Notice that the data is restores to its original directory by default.
# cd /tmp
# ls
Cpio can also be used to archive files in the tar archive format.
# find /tmp | cpio –ovH tar > /dev/st0
Verify the contents of the tape.
# tar -tvf /dev/st0
Perform a restore.
# cpio –ivH tar < /dev/st0
Notice that the cpio restore in tar format restores to the current working directory.
chinaunix网友2010-05-01 22:53:16
http://blog.chinaunix.net/u/1604/showart_2047105.html 这个博文有相关的一些介绍,有兴趣可以去看看。