Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dd / cpio backup problem

Posted on 1997-11-10
2
Medium Priority
?
951 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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 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.
Suggested Courses

610 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