Manipulation DAT tapes on linux

Ilya Palagin tux-4CS0UopE6WdBDgjK7y7TUQ at public.gmane.org
Wed Nov 17 05:30:49 UTC 2004


JM wrote:
> Hi,
> 
> 	I have a 4mm DDS-150 tape in linux and I was wondering if someone can answer 
> this questions.

First - you need 'mt' tools installed.

> 	
> 	is it possible to extract selected file or files from an archive without 
> extracting all the data from the tape?

Extract separate files like this:

tar xvf /dev/st0 /home/user/file01

> 
> 	is it possible to add a directory with files to a tape archive? (tape has an 
> existing data on it)

Jump to the end of data:
mt -f /dev/nst0 eod

And add directory
tar cvf /dev/nst0 /home/dir

> 
> 	is it possible to get the tape usage?	

Rewind to the end of data and get current block, see man mt.  Then 
calculate taken space.

> 
> 	what i usually do is tar -cvf /dev/st0 ..... .... ....
Use /dev/nst0 for multiple archives, this device doesn't rewind tape 
after command execution.  For instance, you have 5 archives on a tape. 
To extract file /etc/passwd from archive #3, execute:

mt -f /dev/nst0 fsf 3
tar xvf /dev/nst0 /etc/passwd
mt -f /dev/nst0 rewind

> 
> 	
> 
> TIA,
> 	
> 
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list