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 files missing

Status
Not open for further replies.

swaughman

Technical User
Feb 27, 2004
116
GB
Rebuilding a server and trying to do a restore. Can restore the etc/hosts file but most of the files are not showing on the tape. Have checked the tape in another server and all the files are there. Why would this be. Using cpio -ivdum -I /dev/rct0 "uniclass/*" but don't think this is the problem.
 
Many of the system files (like /etc/hosts) are symbolic links to the actual file in a different location.

Example:
$ ls -l hosts
lrwxrwxrwx 1 root root 36 Sep 21 1997 hosts -> /var/opt/K/SCO/tcp/2.1.0Eb/etc/hosts

I'm not a CPIO expert, but maybe there's an option to restore the links as well as the actual files?
 
When you performed your backup, did you use this option?

-L Follow symbolic links. The default is not to follow symbolic links.

If not, then your links are probably gone.
 
If I check the tape on another server all these files are there.
 
As pmcmicha says, did the backup include the -L on both servers or only on the one where the files are on tape? Alternatively, perhaps the server where the files exist on tape have been changed to get rid of the links and replace them with the actual files?
 
Don't understand the theory here. Here is the situation. 2 seperate unix servers. 1 tape with files on. Read tape on one server and can see all files to restore. Put tape in the second server and read the tape and it only shows a few files. How can this have anything to do with links?
 
If you wanted to restore all the files on the tape, why are you passing an argument?

cpio -ivdum -I /dev/rct0

restores everything.

But are you saying that cpio -itv shows a DIFFERENT listing on this machine than it does on another?

If that's the case, is this the identical tape drive?


Tony Lawrence
Linux/Unix/Mac OS X Resources
 
Different tape drive. Have tried by inserting the block size that the original was backed up with to see if this made a difference but it was still the same files. The selection is because I want one directory restored.
 
OK. If you see different files with a listing (itv) then there's something screwy between these drives.

Recreate the backup (either from the original or restore these to a machine that wiill read them) but this time make sure compression is shut off on the tape. This does not make sense.. same OS version ?? If not, see -H flag at
Or, try dd'ing the entire tape to a file. Can you see the files you want using THAT file with cpio?

If none of that works, recreate the tape but use one of the supertars from Microlite or Lonetar (free demo downloads will work for this):


Tony Lawrence
Linux/Unix/Mac OS X Resources
 
Are the tape drives compatible? Can you take the working one out and put it in the other?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top