?
Solved

dd / cpio backup problem

Posted on 1997-11-10
2
Medium Priority
?
947 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Taliesin earned 600 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

801 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