Tip

Freeware utility expands command-line functions for tape drives

Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize!


While Windows

    Requires Free Membership to View

has a built-in backup application that works with tape drives (NTBACKUP.EXE), the functions available for it from the command line are limited. This can be a problem if you want to use batch scripts or VBScript to automate how tapes are handled.

A utility called MT is a free program that emulates the functions of the UNIX mt command. Created by Peter Weston, it can work with multiple tape drives in a system by referring to them as tape0, tape1, supports tapes with variable block sizes (up to 5 MB) and allows reading and writing of individual files to tape as well as conventional tape manipulation commands such as retensioning and rewinding.

Here are some of the commands MT supports:

  • drivestatus: Displays the status of all tape drives in the system
  • mediastatus: Displays the status of the media in the specified tape drive
  • format: Formats QIC117 tapes
  • longerase: Forcibly erases everything on the specified tape partition
  • shorterase: Writes an end-of-tape marker at the current position
  • seekend: Moves to the end of the data in the current or specified partition
  • lock/unlock: Prevents or allows the current tape to be ejected

The program also supports creating tape partitions for drives that allow it.

Note that the program writes to tape in a raw data format -- not as a stream that can be read by, say, the Windows backup program. It also doesn't create archives with redundant recovery information; it simply writes the data byte for byte. For that reason, it may not be useful as a backup solution by itself, although it you could certainly use it in conjunction with another program that creates archives with recovery information.

MT also includes the complete source code; it is distributed under the GNU software license so it can be reused freely within an organization without a licensing fee.


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!


This was first published in July 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.