Solved

Extracting individual file from tape remotely

Posted on 2003-12-02
4
277 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
ID: 9864374
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
ID: 9865051
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
ID: 9873244
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
ID: 9873347
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

809 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