Name
mktartape -- save directory trees to tape in Unix tar format
Usage
mktartape
Parameters
None
Description
This task provides a virtually foolproof method for writing
backup tapes in Unix tar format. Significant features:
- supports all tape formats (Exabyte, DAT, DLT, and LTO)
- warns user if no tape drives are attached to the current
machine and offers a list of alternative machines with tape drives
- allows observer to select any tape drive on the current
machine without needed to know the name of the tape drive
- prints list and status of all tape drives attached to
the current machine
- checks status of tape before trying to write to verify
whether drive is already in use, tape is inserted and rewound
- allows user to select from available legal tape densities
- allows user to append new files to those already on tape
- can write multiple data directory trees to tape in one pass,
putting each into a separate tarfile
- verifies the existence of the data directories entered by user
- after writing data to tape can (optionally) verify tape
while creating a tape log
- optionally rewinds and ejects tape at completion of writing
Examples
Here is a sample run (user input in
bold):
gwirth@kapoho:~/tmp% mktartape
----------------------------------------------------------------
Welcome to MKTARTAPE, a program for creating tapes of your data.
----------------------------------------------------------------
No tape devices are attached to this machine (kapoho). Would you like
to try running this program on a different computer which has a tape drive
available? [y]: y
Okay, here's a list of the available machines and tape drives:
N Computer Location Tape_Drives
- -------- -------- -----------
1 pohue Remote Ops II 8mm(Exabyte), DLT, Ultrium
2 pupukea Remote Ops I 8mm(Exabyte)
3 waihee Room 109 (K2 Pre/Post-Observing) DAT, 8mm(Exabyte)
4 moomomi Room 110 (K1 Pre/Post-Observing) DAT, 8mm(Exabyte)
5 mokulau Remote Ops I 8mm(Exabyte)
6 hamoa Remote Ops II 8mm(Exabyte)
7 None of the above --- quit!
Please select an option by number [7]: 4
Okay, spawning /home/kapoho/gwirth/bin/mktartape on moomomi...
----------------------------------------------------------------
Welcome to MKTARTAPE, a program for creating tapes of your data.
----------------------------------------------------------------
Here are the tape devices available on moomomi:
N Type Device Busy? Tape_in? Rewound?
- ---- ------ ----- -------- --------
0 DAT /dev/rmt/0 No Yes Yes
1 8mm(Exabyte) /dev/rmt/1 No No No
2 None of the above --- quit!
Please select an option by number [2]: 0
The tape drive appears to be online and the tape is rewound to the beginning.
Your options are:
(B)egin recording here, or
(S)kip past any existing files on the tape and record from there.
So which will it be? [b]: b
Please select a data format. Options are:
[L]ow
[M]edium
[H]igh
[C]ompressed
Which would you like? [l]: l
Enter name of first data directory to save to tape (RETURN to end list):
> /h/gwirth/tmp/data1
Directory /h/gwirth/tmp/data1 exists and is accessible; adding it to list...
Enter name of next data directory to save to tape (RETURN to end list):
> /h/gwirth/tmp/data2
Directory /h/gwirth/tmp/data2 exists and is accessible; adding it to list...
Enter name of next data directory to save to tape (RETURN to end list):
> /h/gwirth/tmp/data3
Directory /h/gwirth/tmp/data3 exists and is accessible; adding it to list...
Enter name of next data directory to save to tape (RETURN to end list):
> /h/gwirth/tmp/data4
ERROR: directory '/h/gwirth/tmp/data4' not found; please try again
Enter name of next data directory to save to tape (RETURN to end list):
>
Should I generate a logfile listing of the contents of the tape when I am done?
This can help verify that things went smoothly, but will take extra time. [n]: y
Enter name of logfile to create [mktartape.log]:
Should I rewind and eject the tape when done? [y]: y
Before I start writing the tape, please verify the information below:
Hostname: moomomi
Tape device name: /dev/rmt/0lbn
Tape device type: DAT
Density: [L]ow
Directories to store: /h/gwirth/tmp/data1
/h/gwirth/tmp/data2
/h/gwirth/tmp/data3
Logfile: mktartape.log
Rewind before writing: No
Skip to EOM marker: No
Eject at end: Yes
Should I begin? [y]: y
------------------------------------------------------------------------
Storing data from directory /h/gwirth/tmp/data1
------------------------------------------------------------------------
./
foo1.fits
------------------------------------------------------------------------
Storing data from directory /h/gwirth/tmp/data2
------------------------------------------------------------------------
./
foo2.fits
------------------------------------------------------------------------
Storing data from directory /h/gwirth/tmp/data3
------------------------------------------------------------------------
./
foo3.fits
Done writing data to tape.
Rewinding tape to create logfile...done.
Generating listing for file 1...done.
Generating listing for file 2...done.
Generating listing for file 3...done.
Rewinding and ejecting tape...done.
----------------------------------------------------------------
Finished writing tar tape
----------------------------------------------------------------
Bugs
- Does not currently check to verify that the tape has
enough space to hold all data
Last modified: Sun May 25 21:45:19 HST 2003