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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPIO problem

Status
Not open for further replies.

clegg

Programmer
Jan 25, 2001
98
GB
Hi all

I've got a problem! I need to get some data off of a tape via CPIO onto server B.

Unfortuantely Server B's tape drive is broken but I have a working tape drive in Server A.

How do I copy the contents of the tape onto Server B using the tape drive from Server A?

TIA
Clegg
 
Are server A and server B connected thru tcp?

use the dd command to get the image to A, ftp the image to B, and use cpio from the image.

see man dd for the parms

dd if=/dev/nrstp0 of=/temporary/file.cpio
 
cdlvj -

Yes the machines are connected via tcp.

An additional problem is that there is no enough hard disk space on Server A to copy the image as suggested. Server B has a nice empty disk and the data backup I want to CPIO is too large for Server A!!!!!

Any other suggestions?

Clegg
 
Haven't done this in a long time, but you could pipe the dd command to a rcp/rcmd class of commands, or I guess even to ftp.

In the documentation for the rcp series of commands, there are examples of doing backups/recoveries via the rcmd command by piping.

Look thru the documents.
 
Found a backup script, you will need to set up the remote commands.

rcmd serverB "cd /u;find . -print | cpio -ocavB" >/dev/nrStp0

for the restore something like this should work.

cpio -icavB </dev/nrStp0 | rcmd serverB "cpio -ocavB >/temporary/file.cpio"

not positive about syntax.


 
cdlvj -

Should the last bit (/temporary/file.cpio) be replace by something more meaningful or it that the exact syntax?

Clegg
 
Another way is to temporary install the serverA's tape drive into serverB.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
cdlvj -

This is what i'm using:

cpio -icvBdum </dev/rct0 | rcmd oldbox "cpio -ocvBdum >/tmp/data.cpio"

If i'm not logged in as root it seems to be going through the motions but there are lots of errors such as 'cannot get info about file or cpio:cannot link

I've tried running the same script as root but all I get is permission denied.

Any ideas
Clegg
 
One more thing!

I left the script running and the last thing it said was

cpio: cannot write dev/olddat: No space left on device (error 28)

Does this mean its been writing back to the tape??

Clegg
 
The root thing is something not right with the remote setup, is the password the same on both machines?


The /tmp/data.cpio should be a directory on oldbox where all the files will be.

On oldbox look and see if there is a /tmp/data.cpio directory.

look in the directory /dev/oldbox

cannot link means that the tape cpio has links to the actual files. I do believe this will be resolved automatically but not sure.

Could also be a problem if the cpio tape was created with absolute pathnames? Is it possible to send the data to the original directory structure?
 
cdlvj -

Thanks for all your help.

I've decided to to copy data from Server A onto Server B and then use the free space on Server A to restore the tape. When i've finished I can put it all back again.

Not the ideal solution but I'm running out of time ;-)

Clegg
 
Still need to check and find those files, if they indeed did go somewhere, otherwise will be wasting space.

One of the SCO manuals does show how to do this, but it is not where you would expect it to be.
 
I found the files - they were created on server A when they should have been on Server B!!

Not to worry!

Clegg
 
You would worry if they were overwriting more recent versions! Been there, done that!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top