Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restoring from tape

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm trying to get a list of files that are stored on tape. I've managed to come up with a command that works by looking at some old scripts from an older server. The command I'm using is
cpio -itv < /dev/rmt0 | tee /tmp/1998

What I'm unsure of is why the command fails unless i have the 'tee' after the pipe character. what does this 'tee' do? If I try cpio -itv < /dev/rmt0 | /tmp/1998 it tells me the file doesn't exist.
Thank You
 
Solution # 1 ( takes 1 short day) - throw money at people recovering others tapes
Solution # 2 (takes 24 LONG HOURS) - read older posts as tape recovery is recurring problem in this forum
 
Hello,
Simple question.
Do you know what command was used to save the data in the first place.
cpio, or tar or what command.
If you know the command that was used to save the tape then look at man on that command and it will say what flags to use to see the content of the tape.

We do not know what command was used to back up the data.
 
When you omit &quot;tee&quot; you should also omit &quot;|&quot;. The pipe is a redirection to tee /tmp/1998. The tee command displays output of a program AND puts it into a file. If you just want to put the output to /tmp/1998, use the &quot;>&quot;. If you don't care about /tmp/1998, just do the part to the left of the pipe: cpio -itv < /dev/rmt0

My main &quot;programming technique&quot; is recalling commands and tacking pipes onto the end. Like this:

lsvg | xargs -n 1 lsvg
lspv | grep datavg | awk '{print $1}' | xargs -n 1 lspv

Read up on xargs, it is very useful for sloppy people like me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top