Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2023233
  • 博文数量: 213
  • 博客积分: 10474
  • 博客等级: 上将
  • 技术积分: 2149
  • 用 户 组: 普通用户
  • 注册时间: 2005-05-05 16:53
个人简介

顺着天性做事,逆着个性做人.

文章分类

全部博文(213)

文章存档

2020年(3)

2015年(1)

2014年(1)

2013年(1)

2012年(4)

2011年(8)

2010年(36)

2009年(17)

2008年(38)

2007年(25)

2006年(37)

2005年(42)

分类: 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.

阅读(1730) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-05-01 22:53:16

http://blog.chinaunix.net/u/1604/showart_2047105.html 这个博文有相关的一些介绍,有兴趣可以去看看。