linux虚拟机使用磁带机,在Linux下如何使用磁带机

在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

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

Notice that the cpio restore in tar format restores to the current working directory.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值