|
|
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已! |
|
恭喜您是本站第 1735166
位訪客!
登入 | 註冊
|
|
|
|
發表者 |
討論內容 |
冷日 (冷日) |
發表時間:2007/6/26 8:42 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [分享]Linux tape backup with mt and tar command - howto
- Linux (and other Unixish system) use mt command to control magnetic tape drive operation. You need to use mt command while working with tape drive. It allows you to reading and writing to tape.
The default tape drive under Linux is /dev/st0 (first SCSI tape device name). You can read more about tape drives naming convention used under Linux here. Following paragraph summaries command you need to use control tape drive for backup/restore purpose.
Rewind tape drive: Backup directory /www and /home with tar command (z - compressed):
# tar -czf /dev/st0 /www /home
Find out what block you are at with mt command:
Display list of files on tape drive:
Restore /www directory:
# cd /
# mt -f /dev/st0 rewind
# tar -xzf /dev/st0 www
Unload the tape:
Display status information about the tape unit:
Erase the tape:
You can go BACKWARD or FORWARD on tape with mt command itself: (a) Go to end of data:
(b) Goto previous record:
(c) Forward record:
Replace /dev/st0 with your actual tape drive name.
|
|
討論串
|