KB Logo

TOLIS Group Knowledge Base

Browse KB by category:
Go to KB #:
Email   Bookmark

How do I write to a tape with the 'tapewrite' command?

Views: 17122
Votes: 2
Posted: 16 Oct, 2007

Writing a tape with tapewrite

In much the same manner that taperead will read a raw data stream from a tape, tapewrite will accept a raw data stream from another application’s standard output and write it onto tape.
Since the default archive utilities are not tape aware under OS X , the TOLIS Tape Tools tapewrite utility provides the mechanism required to enable these commands to write to tape.

An example session using tar to backup the /Users directory under OS X looks like:

tar –cvf - /Users | tapewrite

Notice that, like in reading a tape, tar’s –f argument is ‘-‘, or stdout in the case of writing an archive.

The same conditions apply to writing archives using tapewrite that we mentioned in our discussion of taperead.

The main thing to keep ion mind is that the default I/O buffer used in tapewrite should match the buffer used by the archive utility. Therefore, if you boost tar’s buffer size with the –b option, you should also provide the appropriate value to tapewrite using the –b option:

tar –cvb 128 –f - /Users | tapewrite –b 65536

Also, because of the raw nature in which tapewrite processes your data, you can pretty much use it with any tool’s standard output. While we wouldn’t necessarily recommend this use, you could actually combine the dd command with tapewrite to create an image of your primary disk drive on tape:

dd if=/dev/rdisk0 bs=1024 | tapewrite –f ntape0

Others in this Category
document How can I test to see if my tape drive/library is operating properly under Mac OS X?
document How do I use the 'tapecopy' command to copy a tape?
document How do I control my tape library with the libctl (tm) command on Mac OS X?
document Apple SIP prevents access to special folders causing "Permission denied" errors
document How do I use the 'taperead' command?
» More Articles

Powered by KnowledgebasePublisher
Page Load Time: 0.029927 seconds / 29.927 milliseconds.
Page File Size: 22091 bytes.