Solved

Extracting individual file from tape remotely

Posted on 2003-12-02
4
284 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

751 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