Solved

CPIO ERRORS

Posted on 2004-08-05
2
834 Views
Last Modified: 2013-12-05
Unixware - Is there a log I can look at to see what files did not get stored and/or restore and what was the error message when I am using cpio to do my backups and restores. Example Restore

cpio -icvdumC32768 -I/dev/rmst/ctape1 "DATA/*"

Thank you.
0
Comment
Question by:petro2
2 Comments
 
LVL 61

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 11728193
There is no log. all you can do is add 2>~/cpio_log
There is very little meaning from backing up always modifying binary files used by applications.
readd at least manual pages for tar pax and cpio, somewhere will be some mention how long they wait the files to close.

cpio usually does not archive open files, you need to dump application which opened files ( commands are fstat or fuser, if none of these, then install lsof from skunkware)
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 11732209
Avoid use -C with cpio when you can (if you forgot which value was use, then you will
have trouble to restore it)

For SCO you the following option is good enough:

Write to tape, support multiple volumes:
cat LIST | /bin/cpio -oacv -O /dev/rmst/ctape1
or (backup the whole system)
find / -print | /bin/cpio -oacv -O /dev/rmst/ctape1

To restore:
cd /dir-torestore
cpio -icdmuv -I /dev/rmst/ctape1

To log the cpio restore:
cpio -icdmuv -I /dev/rmst/ctape1 >/tmp/cpio.log 2>&1

It will log the whole restore process, if you only want errors, see  gheist's comment.

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now