Solved

dd / cpio backup problem

Posted on 1997-11-10
2
939 Views
Last Modified: 2008-03-06
The following script returns sometimes an error-Code

rsh -n server " cd /; find . -print| grep -v \"^./cdrom/\"  \
        | grep -v \"^./home/\"  \
        | grep -v \"^./usr/\"  \
        | cpio -o -c -B " \
| dd of=/dev/rmt/0 bs=5k
(time for backup: total 4h )

1) dd returns sometimes an "dd: unexpected short write wrote 0 bytes,expected 5120".Is this an error ?
2) Is it possible that cpio is not working correctly if some files were deleted/changed during backup ?
thanks for help
Bernd
0
Comment
Question by:bzimmermann
2 Comments
 
LVL 1

Accepted Solution

by:
Taliesin earned 200 total points
ID: 2007668
1) Nope, it's a warning message, you are trying to write
  with dd an empty output from cpio, then it's a cpio error.

2) Yep, that's because you are using too many pipelines and
  a slow tape write, you should try making it faster, with
  a local find, and checking the output before doing the cpio/dd
  pipe.


example: rsh -n server "(find [dir_list] -print \
        | cpio -o -c -B 2>/dev/null )" \
        | dd of=/dev/rmt/0 bs=5k

thus avoiding the serach on wrong directories, and the error
processing, maybe you should add a file existence checking
before the cpio with an:  xargs if [-f $1] ....
or something similar, depending on your shell...
0
 

Author Comment

by:bzimmermann
ID: 2007669
change cpio ... 2>/dev/null
into   cpio ... 2>/tmpfile_on_remote_host
to get the error message of the cpio
(in this case a broken pipe)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

825 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