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

cpio restore

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i used cpio to backup the entire system:

find . -depth -print | cpio -ocvB -O /dev/rct0

i wanted to restore a particular file or dir, say /etc/motd - tried: in this example on a current directory .

cpio -iv </dev/rct0 /etc/motd .

is there something wrong with the command?


 
Hello,

This is a little advise from a long time SCO administrator. Take it if it applies or ditch it if you don't like my opinion ? Stop using both the tar and CPIO programs to backup your system. They both have some quirks to them. My prefered Backup application is BackupEdge. It is so superior to tar or CPIO you will not ever want to use them again for backing up data or system restores!!! See
it will be worth it if your data is mission critical !! And no i'm not a salesman. BackupEdge just plain does a far superior job !!
For help with your CPIO command lines type man cpio.
 
thanks...

i know BackupEdge...i just want the syntax for the command cpio in retrieving a specific file/dir......

i am just supporting an old client...
 
Johnny, try &quot;quoting&quot; your filename, but do be careful if the restore is goung to bring back files with absolute pathnames! HTH.
 
hi

since you backed your filesystems up find . , you should have
your data backed up as etc/motd

so cd into /
cpio -ivc < /dev/rct0 etc/motd

( to find out how its backed up to cpio -itvc </dev/rct0

you should see files backed up like etc/motd
etc/syslog.conf
NB:- without the / or . in front

if you want to restore this file in another dirtectory
used d flag with cpio i.e.

cd /newdir
cpio -ivcd </dev/rct0 etc/motd

hth
 
thanks to you all,

i found out the solution:

cpio -icdmvu -I /dev/rct0 &quot;etc/motd&quot;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top