04-04-2004
Restoring a directory using cpio command?
I am confused with how to restore archives. I just figured out the use of tar, but now after trying it with cpio, I'm unsure of some things. Firstly, is it necessary to cd to the directory you will be restoring to in order to run this command?
Secondly, what is it I'm doing wrong when trying to restore an archive into an empty directory?
$ cpio -ivdu backup.cpio < cpio-restore
backup.cpio is a file and cpio-restore is a directory
I am getting the following error:
cpio: read error: Is a directory
Thank you
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi friends..
I want to be able to copy a file from one location to another (locally). The location the files are copied to should have compressed instances of the files they were copied from.
copy from /home/user/test.file
copy to /backup/user/test.file.Z
I need to be able to do this... (1 Reply)
Discussion started by: sureshy
1 Replies
2. Filesystems, Disks and Memory
Hi Friends,
How can I Restore the Files present under "lost+found" Directory of a FileSystem (in Solaris & Tru64 OS) to their original Locations.
Now-a-days I am loosing lots of files in 2 of my Machines,
One running Solaris8 and other Tru64(Digital) Unix.
Thanx in... (1 Reply)
Discussion started by: dhasarath
1 Replies
3. UNIX for Dummies Questions & Answers
Please help me in resolving the issue.
I have taken backup using the below command
$ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z
I tried to restore the backup using the below command.
$ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf -
... (2 Replies)
Discussion started by: amirthraj_12
2 Replies
4. UNIX for Advanced & Expert Users
Please help me in resolving the issue.
I have taken backup using the below command
$ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z
I tried to restore the backup using the below command.
$ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf -
... (5 Replies)
Discussion started by: amirthraj_12
5 Replies
5. UNIX for Dummies Questions & Answers
hi,
can any body tell me the advantages of having cpio command over tar command (7 Replies)
Discussion started by: prasannak
7 Replies
6. UNIX for Dummies Questions & Answers
Hey everyone,
I’ am a newbie to Unix. Learning some of the basic commands.
I did some piping before like who | wc
I wanted to practice some backup features in Unix. I’ am practicing using cpio and place it into a file named backup. I’m not quite sure where I’ am going wrong?
... (1 Reply)
Discussion started by: fox987
1 Replies
7. UNIX for Dummies Questions & Answers
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
8. Solaris
i need to extract cpio file archived full path to /restore/ (not full path or fullpath under this directory ) i can't find option for cpio please help me
example.
i have cpio file archive /etc/* and i need to extract file to /restore
#cpio -ivBcdmu < xx.cpio
but data from cpio not... (3 Replies)
Discussion started by: infjustice
3 Replies
9. Shell Programming and Scripting
I need a hint for reading manpage (I did rtfm really) of cpio to do this task as in the headline described. I want to put all files of a certain type, lets say all *.txt files or any other format. Spread in more than hundreds of subdirectories in one directory I would like to select them and just... (3 Replies)
Discussion started by: 1in10
3 Replies
10. UNIX for Advanced & Expert Users
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