CPIO listing from tape question...


 
Thread Tools Search this Thread
Operating Systems SCO CPIO listing from tape question...
# 1  
Old 05-23-2012
CPIO listing from tape question...

Hi.

I have this old server onto which i needed to list the content of a tape. This is a SCO box (SCO_SV 3.2 5.0.6 i386) and backup was done using cpio.

Code:
#tape status
     status : ready beginning-of-tape
soft errors : 0
hard errors : 0
  underruns : 0

#dtype /dev/rct0
/dev/rct0       : cpio old character format

#cpio -ivt < /dev/rct0
1 blocks

I am not familiar with cpio and sco...but I remember doing a restore waaaayyyyy long ago and these are the commands i used to prep and list the content

If i remembered correctly, the cpio -ivt would "list" the tape content. But all i get is the "1 blocks" answer...

Is it, because there is nothing on the tape? Any other way i can "list" the content?

Thanks folks!
# 2  
Old 05-23-2012
Please post the script which was used to create the tape.

We are particularly interested in whether the "no rewind" device was used on output in which case you would need to use the unix mt command to advance partition-by-partition along the tape. Also whether the block size parameters and/or ASCII headers options were used because the same parameters are required on data retrieval.

I think that we can safely say that the first tape partition is empty, or contains something not recognisable as a unix filesystem, or was written with special parameters.
BTW. In those days we used to pipe cpio to dd to get some speed and this created a raw tape partition.

Tip: If you have a blank tape available, practice the commands on a blank tape and keep an eye on the device directory to make sure that you actually write to the tape drive and not to a file. Try some basic mt commands to make sure that the tape moves.

Footnote: By old you mean really old (i386 !). What is the hardware? I wouldn't risk loading any critical data tapes until you are 100% sure of the commands because you may only have one go at this.

Last edited by methyl; 05-23-2012 at 05:48 PM..
This User Gave Thanks to methyl For This Post:
# 3  
Old 05-24-2012
Well it's been a few years since I was deep into SCO Unix but here are my thoughts on this.

FIRSTLY, write protect your cartridge, DAT or whatever to avoid any accidents!!!

As Methyl comments do you have the script/utility that wrote the tape? Many utilities did their own thing and created "headers" and stuff on the front of tapes.

I seem to remember that on SCO

Code:
 
cpio -ivt < /dev/rct0

did not behave the same as

Code:
 
cpio -ivt -I /dev/rct0

Crazy but I think that's true.

Basically, you are right that the switches -ivt should list the tape. The tape might have been written using the -c switch and/or the -B switch but I also seem to remember that cpio could figure that out for itself on a restore.

As Methyl suggests try a no-rewind device several times over and see what happens.

I suggest that you try all these:-

Code:
 
cpio -ivt -I /dev/rct0
cpio -ivt -I /dev/nrct0  (repeat this command several times)
cpio -ivtcB -I /dev/rct0
cpio -ivtcB -I /dev/nrct0  (repeated several times)

You are sure that the tape isn't tar format???
This User Gave Thanks to hicksd8 For This Post:
# 4  
Old 05-29-2012
Thank you for the input. After some trial and error, finally got it to work. don't know why it is behaving that way, but ran command once, did not work, but after retrying it worked? Maybe just a "timing" issue...not being patient and waiting for the data to be displayed?

I took notes of the commands you've provided and will keep them in mind for my next "old" server needs...Yep, i386 are pretty darn old Smilie But, they work flawlessly...The hardware are actually IBM 1U servers. Can't remember the model exactly (x336 i think?)
# 5  
Old 05-29-2012
Quote:
but ran command once, did not work, but after retrying it worked?
You never said what tape drive or brand, but some DAT drives have a header partition that you have to bypass. So the first attempt reads the header without rewinding, then the second attempt gets the data.
# 6  
Old 05-29-2012
@Stephan
Please post the command which worked (when typed twice).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Listing tape in AIX | backup taken from windows

Hi, We have backup on LTO-3 tape it was taken from windows via windows backup utility, now the issue is that we want to list the content of tape in aix 6.1. Kindly help. Regards Salman (3 Replies)
Discussion started by: salmanraza
3 Replies

2. AIX

Slow listing of LTo5 tape contents

Hi, We are taking our filesystem backup having size of 1.3 TB on LTO5 catridges using the following command find * -print|backup -ivf '/dev/rmt0' '-U' i.e backup byname and it took about 6.5 Hours to complete When we are listing same tape contents using the following command restore... (1 Reply)
Discussion started by: m_raheelahmed
1 Replies

3. AIX

CPIO restoration from LTO2 tape media on AIX 4.3.3

Hi, AIXers :) Recently i'm playing around with cpio command, when i try to list out content from LTO2 Tape media using command: #cpio -itvc < /dev/rmt1 it's stopped at particular path 100777 root 1042591 Mar 24 10:09:05 2012 /home/uv/bin/usd and there was an error thrown out: ... (2 Replies)
Discussion started by: polar
2 Replies

4. UNIX for Dummies Questions & Answers

Remote Tape Backup Using cpio

Hi all, I've got two HP machines running HP-UX 11.31 and would like to remotely backup one server onto another server's tape unit using the cpio command. The two servers use a secured communication channel, i.e ssh. Kindly help, Koketso (1 Reply)
Discussion started by: Koketso
1 Replies

5. UNIX for Advanced & Expert Users

extract cpio backup on tape

Hi, I was wondering, If I take a backup using cpio to tape from UNIX, can I extract data on windows box using cpio for windows? Anybody ever do this? Thanks. (1 Reply)
Discussion started by: yonez
1 Replies

6. Red Hat

reading an AIX cpio tape on RH8

Thanks for any insights you might have... I have a RH8 system setup with a DAT drive. I have a AIX tape that was made using cpio. Bottom line is I need to read the AIX tape into the RH box. I was able to do cpio -itv --no-absolute-filenames < /dev/st0 and read the table of contents. ... (0 Replies)
Discussion started by: mike114327
0 Replies

7. UNIX and Linux Applications

cpio question

I apologize in advance if someone else has posted a similar question and I overlooked the answer in the forums, so here goes. i'm using cpio to retrieve data from a tape and the switches i'm using are cpio -AvicdumkB -I/dev/rct0 now the data i'm trying to restore is a specific couple of... (5 Replies)
Discussion started by: HNelson
5 Replies

8. UNIX for Dummies Questions & Answers

Selective restore from a cpio tape archive

Hi, I use following command to restore data from my cpio tape archive: $cpio -icvd < /dev/rct0 But this'll restore all tape contents to the current path, what if I want only selected files from the tape, suppose I want /home/compdir/home2/Rev83/data/PL/01/*.* files to be restored... (8 Replies)
Discussion started by: tayyabq8
8 Replies

9. HP-UX

Listing the Ignite Backup tape

HI All I have created the bootable recovery tape using the ignite command make_tape_recovery, I need help for the command to list the content recorded in that tape. Regards, Gege:confused: (1 Reply)
Discussion started by: cgege
1 Replies

10. UNIX for Dummies Questions & Answers

backup listing(cpio)

Hi i am using HPUX and i want to know wht is the command to see the listing from the tape device.. i have taken the backup using cpio -ocvB>/dev/rmt/0m while seeing the listing using cpio -itvB</dev/rmt/0m it is not showing the listing giving message -c option sd be there if i put -c... (1 Reply)
Discussion started by: Prafulla
1 Replies
Login or Register to Ask a Question