Archiving Data to Tape
The following is a brief description of the steps involved in writing
files to tape, e.g. for archiving.
There are tape drives on riot and blast, accessible via the
following device names. Check the
lab map for machine locations.
riot:/dev/tape
blast:/dev/rmt/0cn
If you are archiving from dodo, please follow the instructions
from this page.
Examples of the following steps are given for each machine.
Steps
Insert the Tape
The lab currently stocks tapes in two sizes: DC4-90 and DC4-120. DC4-90
tapes hold approx. 2 Gbyte uncompressed, 4 Gbyte compressed. DC4-120 tapes
hold approx. 4 Gbyte uncompressed, 8 Gbyte compressed.
Rewind the Tape
For riot:
% ssh riot mt -f /dev/tape rewind
For blast:
% ssh blast mt -f /dev/rmt/0cn rew
Advance the Tape
Fast forward the tape to the n-th end-of-file (n is a number).
% ssh riot mt -f /dev/tape fsf n
or:
% ssh blast mt -f /dev/rmt/0cn fsf n
Write to the Tape
To write directory 'dirname' and its contents to the tape:
% tar -cf - dirname | ssh riot dd of=/dev/tape
or:
% tar -cf - dirname | ssh blast dd of=/dev/rmt/0cn
Read the Table of Contents
To read the table of contents of a tar file on the tape, first fast
forward the tape to the desired file as described above. Then:
% ssh riot dd if=/dev/tape | tar -tvf -
or:
% ssh blast dd if=/dev/rmt/0cn | tar -tvf -
Retrieve Files from the Tape
To retrieve files from the tape, first fast forward to the desired
tar file as described above. Then:
% ssh riot dd if=/dev/tape | tar -xvf -
or:
% ssh blast dd if=/dev/rmt/0cn | tar -xvf -
Using Compression
Files can be compressed by using the -z option to tar. Compressed files
must also be read using the -z option. Example for riot:
Write:
% tar -czf - dirname | ssh riot dd of=/dev/tape
Read:
% ssh riot dd if=/dev/tape | tar -tvzf -
Other Notes
- Tar can be made verbose using the -v option.
- Increase speed by increasing block sizes. Insert
bs=126k
after dd in both write and read commands. Remember to write
the block size (126k) on the tape label for later reference.
- For long archives, redirect verbose output to a file and run in the
background. Surround the entire command with parenthesis, then append:
>& result_filename &
Welcome
· Projects
· People
· Papers
· Calendar
· Links
· Internal
© 1997 Information Coding Laboratory
Send comments to www@code.ucsd.edu
Last modified: Wed Mar 18 14:48:00 PST