Linux Scroll

Just another WordPress.com site

Manage Tape Drive in Linux

Using mt command to control magnetic tape drive operation.

Rewind tape drive:

$ mt -f /dev/st0 rewind

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:

$ mt -f /dev/st0 tell

Display list of files on tape drive:

$ tar -tzf /dev/st0

Restore /www directory:

$ cd /

$ mt -f /dev/st0 rewind
$ tar -xzf /dev/st0 www

Unload the tape:

$ mt -f /dev/st0 offline

Display tape info:

$ mt -f /dev/st0 status

Erase the tape:

$ mt -f /dev/st0 erase
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: