Solved

Extracting individual file from tape remotely

Posted on 2003-12-02
4
276 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.

863 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

20 Experts available now in Live!

Get 1:1 Help Now