The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem restoring files from remote tape drive lindab SUN Solaris 4 07-02-2007 05:52 AM
Restoring tape files... B14speedfreak UNIX for Dummies Questions & Answers 0 03-09-2007 08:45 AM
Restoring dump from tape to SCSI disk domesat SUN Solaris 0 02-28-2007 11:47 PM
Blocksize problem restoring file from tape citrowske UNIX for Dummies Questions & Answers 11 10-17-2005 01:22 PM
Problems restoring from tape in AIX The Hunter AIX 0 02-02-2005 01:04 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-27-2001
Registered User
 

Join Date: Jun 2001
Location: Sydney Australia
Posts: 3
Question Restoring a file from Tape

help please
i have "inherited" a Sco Server (the administrator departed in a hurry...yes we are chasing him..) and haven't used Unix for 8 years.
i have a file that i need to retrieve from a tape.
i have been able to find the file on tape using the cpio -ivt command.
however...
the problem I have is that i wish to restore the file to a different directory and i am having problems understanding the syntax of the cpio command.
would some please assist me.
regards,
mark
Forum Sponsor
  #2  
Old 06-28-2001
Registered User
 

Join Date: Jun 2001
Location: UK
Posts: 4
cpio

I would think that the command is basically the same, but on AIX the following should work;

cpio -iv "file.exttention" </dev/rmt0

the file should be restored to the current directory, if you want to create the original directory within the current directory change -iv for -idv

  #3  
Old 06-28-2001
Registered User
 

Join Date: Jun 2001
Location: Sydney Australia
Posts: 3
not quite what I was after
the problem is that i dont have a test system so when i do this it will be restored into a live accounting database.
what about the following will it work?
cpio -iAcvBu -I </dev/nrStp0 ./data/accountdb/GL.AAREPORT

I think this will restore to the original directory...I need to restore to a different directory such as ./temp

any ideas?
  #4  
Old 06-29-2001
Registered User
 

Join Date: Jun 2001
Location: Sydney Australia
Posts: 3
worked it out....

The major issue that i had was that the data was copied to tape using file marks..
So to pass this information onto those who may be interested in cpio...

To rewind the tape user the following command:
tape -s rewind

To advance the tape to the next file mark:
tape rfm

To check tape status:
tape status

To list what is located in the file mark:
cpio -itv </dev/nrStp0 > filelist
The you can cat or more the list to locate the file you need.

To restore a specific file from tape to the current dir:
cpio -ickvdumBI /dev/nrStp0 "%filename%"

To check the files now exist:
ls-l %filename%

To to set the access rights for the restored file:
chgrp %unname% %filename%

Google The UNIX and Linux Forums
Closed Thread

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0