cpio restore - relative pathname


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cpio restore - relative pathname
# 1  
Old 08-20-2002
cpio restore - relative pathname

SCO/Caldera Unixware 711

Hi Friends,

I have a cpio file which was created using relative pathnames.

the relative pathname is users/data/*

I want to restore these files to a different directory with cpio.
An example restore directory is /home/suresh

Is this possible ?
Can someone please provide syntax.

Thanks

Suresh
# 2  
Old 08-20-2002
Couldn't you just use the copy or move command?

cp -R pathToCopyFrom pathToCopyTo

For example, after you have restored the files to their respective paths, you could type:

cp -R users/data/* home/suresh

----
or:

mv pathToMoveFrom pathToMoveTo

mv users/data/* home/suresh

Last edited by oombera; 08-20-2002 at 01:34 PM..
# 3  
Old 08-27-2002
hi,

Problem is this is a script which will cpio a lot of files and didn't want the extra processing.

I have solved issue using absolute pathnames.

Thanks

Suresh
# 4  
Old 08-27-2002
If your archive contains relative path names then just go to your new directory (where you whant to extract the files) and enter the cpio command with respective parameters
# 5  
Old 08-27-2002
spavlov -

Yeah but if you moved to the new directory and extracted the files, new folders will be created and the files will be stored in /users/data within /home/suresh, and you'd still have to move all the files two levels up into the suresh folder.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cpio - input files (from list) are stored in different order inside cpio archive - why?

Due to budget constraints I have to reinvent an Enterprise backup system in a SPARC (sun4v) Solaris estate (10 & 11). (yep - reinvent wheel, fun but time consuming. Is this wise?! :confused: ) For each filesystem of interest, to try to capture a 'catalog' at the front of each cpio archive (for... (1 Reply)
Discussion started by: am115998
1 Replies

2. UNIX for Beginners Questions & Answers

CPIO Restore

Please note that using the command cpio to back up to tape was successful. Used the below command: time find /accts -print | cpio -oa --block-size=512 --format=newc --verbose -O /dev/nst0 I'm trying to restore from tape of a particular file and having issues. Below is the command to restore... (7 Replies)
Discussion started by: isoabv
7 Replies

3. UNIX for Beginners Questions & Answers

Cpio Restore didnt go to plan

Hello folks, one of the RAID drives in our SCO system crashed recently and being hot swap it was replaced. Problem was that on boot it stops at: Checking protected password and protected subsystem databases.... First I did #authck -a and checked /etc/auth/system/ttys as per instructions in a... (7 Replies)
Discussion started by: Redstar
7 Replies

4. UNIX for Dummies Questions & Answers

Unable to restore cpio archive to a directory

Hello Every one, I want to back up all passwd files to /xyz/passfiles.cpio and Then restore them to /abc directory. Here is what I wrote: find / -name passwd | cpio -oc > /tmp/passwd.cpio and to restore cd abc cpio -ium < /tmp/passwd.cpio I can not find the files restored to /abc... (2 Replies)
Discussion started by: drdigital_m
2 Replies

5. UNIX for Dummies Questions & Answers

restore cpio file

Hi, under unix aix , i had to put a catostrophic patch from an editor ... i had first made a cpio backup connected root cd /application find . –print | cpio –ocvBm > /sauvegarde/sauvegarde.cpio Does someone know the command to restore my cpio backup ? thanks in advandce to everyone ... (7 Replies)
Discussion started by: bzh35
7 Replies

6. SCO

cpio Backup and restore to spare server fails

Our company purchased a spare HP ML350 server - identical to current one in use to act as minimal downtime replacement should the inevitable happen. After install of OS 5.0.7 and restore of cpiobackup I get this message: -: Syntax error: Hostname= $inexpected The SCO licence policy... (4 Replies)
Discussion started by: moondogi
4 Replies

7. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

8. UNIX for Dummies Questions & Answers

get cygpath to leave relative paths as relative?

If I execute mypath=`cygpath -w ../` echo $mypath I get d:\unix\nextVersion\script OK, d:\unix\nextVersion\script is the correct windows version of the path, but it is in absolute form. I would prefer it if cygpath left it in relative form, i.e. echo $mypath should output ..\ ... (0 Replies)
Discussion started by: fabulous2
0 Replies

9. 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

10. UNIX for Dummies Questions & Answers

find without pathname

How can I get the results of a find back without the pathname for example if i do find ../../ -name \*.sql i dont want to see directory/directory/filename.sql I only want to see filename.sql (3 Replies)
Discussion started by: MBGPS
3 Replies
Login or Register to Ask a Question