Solved

Extracting individual file from tape remotely

Posted on 2003-12-02
4
275 Views
Last Modified: 2010-04-21
can someone provie the syntax to retrieve a file from a remote tape drive using either dd or tar/rsh.I am using Solaris8.
0
Comment
Question by:ranadhir
  • 2
  • 2
4 Comments
 

Author Comment

by:ranadhir
Comment Utility
I just need to extract an individual file from the zipped archive,and not the entire archive.
0
 
LVL 1

Accepted Solution

by:
mbekker earned 20 total points
Comment Utility
Hi ranadhir,

If it's a tar archive you could try the following:

rsh <hostname> "dd if=/dev/<tape_device> bs=512" | tar xvf - <file_to_extract>

There's only one problem, the complete archive will be send through the network.

You could also extract the file on the remote system and use a remote copy to copy the file to the local system. Only data from that file will be send over the network:

rsh <hostname> "tar xvf /dev/<tape_device> <file_to_extract>"
rcp -p <hostname>:<path>/<file_to_extract> <local_path>/<file_to_extract>

Good luck!
0
 

Author Comment

by:ranadhir
Comment Utility
Thanks a lot for the suggestion.Since the 'tar xvf' does not accept pattern matching - I am doing a
tar xvf /dev/rmt/0 `tar tf | grep '<pattern>'` on the machine to which the tape is attached.
Can this same command be fired with the rsh option from a remote machine(using pattern matching facility of tar)
0
 
LVL 1

Expert Comment

by:mbekker
Comment Utility
It should work. The only problem I see is the rcp part, this should be changed in something like this:

rcp -p <hostname>:<path>/<pattern> <local_path>

So, without the <file_to_extract> part.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now