2022年Linux环境下磁带机的直接备份操作 .pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《2022年Linux环境下磁带机的直接备份操作 .pdf》由会员分享,可在线阅读,更多相关《2022年Linux环境下磁带机的直接备份操作 .pdf(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Linux 环境下磁带机的直接备份操作Working with “mt” Commands: reading and writing to tape.The following assumes the tape device is “/dev/st0STEP 1 ( rewind the tape) # mt -f /dev/st0 rewind STEP 2 (check to see if you are at block 0) # mt -f /dev/st0 tell At block 0. STEP 3 (Backup “tar compress” directories “one”
2、 and “two”)# tar -czf /dev/st0 one two STEP 4 (Check to see what block you are at) # mt -f /dev/st0 tell You should get something like block 2 at this point. STEP 5 (Rewind the tape) # mt -f /dev/st0 rewind STEP 6 (List the files) # tar -tzf /dev/st0 one/ one/test two/ STEP 7 (Restore directory “one
3、” into directory “junk ”). Note, youhave to first rewind the tape, since the last operation moved ahead 2 blocks. Check this with “mt -f /dev/st0.# cd junk # mt -f /dev/st0 rewind # mt -f /dev/st0 tell At block 0. # tar -xzf /dev/st0 one STEP 8 (Next, take a look to see what block the tape is at) #
4、mt -f /dev/st0 tell At block 2. STEP 9 (Now backup directories three and four) # tar -czf /dev/st0 three four After backing up the files, the tape should be past block 2. Check this. # mt -f /dev/st0 tell At block 4. Currently the following exist: At block 1: one/ one/test two/ 名师资料总结 - - -精品资料欢迎下载
5、- - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 5 页 - - - - - - - - - At block 2: three/ three/samplehere four/ At block 4: (* This is empty *) A few notes. You can set the blocking factor and a label with tar. For example: $ tar ?label=”temp label” ?create ?blocking-factor=128 ?fil
6、e=/dev/st0 Notes But note if you try to read it with the default, incorrect blockingfactor, then, you will get the following error: $ tar -t ?file=/dev/st0 tar: /dev/st0: Cannot read: Cannot allocate memory tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now However th
7、is is easily fixed with the correct blocking factor $ mt -f /dev/st0 rewind $ tar -t ?blocking-factor=128 ?file=/dev/st0 temp label Notes Take advantage of the label command. $ MYCOMMENTS=”Big_important_tape”$ tar ?label=”$(date +%F) ”+”$MYCOMMENTS”Writing to tape on a remote 192.168.1.155 computer
8、$ tar cvzf - ./tmp | ssh -l chirico 192.168.1 .155 ,(mt -f /dev/st0 rewind; dd of=/dev/st0 )?Restoring the contents from tape on a remote computer $ ssh - l chirico 192.168.1.155 ,(mt -f /dev/st0 rewind; dd if=/dev/st0 )?|tar xzf - Getting data off of tape with dd command with odd blocking factor. J
9、ust set ibs very high $ mt -f /dev/st0 rewind $ tar ?label=”Contenets of Notes” ?create ?blocking-factor=128 ?file=/dev/st0 Notes $ mt -f /dev/st0 rewind $ dd ibs=1048576 if=/dev/st0 of=notes.tar The above will probably work with ibs=64k as well Linux 下使用磁带机的方式有多种,主要有通过Amanda 、Tar 等软件进行操作。Amanda 是提供
10、了远程集中备份的功能,通过分别设置客户端、 服务器端, 实现远程集中存储备份。而Tar 主要用于单机环境下,将数据直接写入磁带的备份。针对单一节点的备份,只要简单的使用T ar 命令进行备份、恢复即可。安装对于目前厂家的 HP DAT24/40 系列外置 SCSI 磁带机,都带有自动回卷功能。将其接在外置SCSI 的总线上,并重新启动服务器。重新引导后,执行dmesg将能看到新的磁带机设备叫/dev/st0 。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 5 页 - -
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年Linux环境下磁带机的直接备份操作 2022 Linux 环境 磁带机 直接 备份 操作
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内