Using rsync to mirror a hard drive.

Dave Dykstra dwd at
Tue Oct 23 05:50:54 EST 2001

On Mon, Oct 22, 2001 at 05:37:51PM +0000, Thaddeus L. Olczyk wrote:
> >> I then mounted a partition of 15M on /mirror, and executed the script
> >> to get an idea of how rsync behaved when it ran out space.
> >> 
> >> rsync seems to hang in the middle of /etc .
> >> df shows that only 75% of /mirror is filled/
> >> 
> >> Any idea why rsync hangs.
> >
> >Perhaps it's a problem with your script?
> >
> I should say that I've run it from the command line, from the
> command-line with strace ( traces system calls ), ltrace ( traces
> library calls ) and from within emacs. In each case it hangs.

I take it then that strace didn't show you any obvious problem with
reading some file in /etc.

Are the filesystems locally mounted?  In any case you may have an
improvement with the --whole-file option which disables the rsync
rolling checksum algorithm and therefore reduces disk traffic.
You also may be running into the problems that Wayne Davison has 
developed a patch for at

> >Rsync excludes are not as powerful as regular expressions.  However, if
> >you start them with a slash, they match only the beginning of a path.
> >So you should be able to just say "/proc", "/mirror", "/tmp", etc.
> >
> One of the problems that I get ( which I'm not yet seriously tackling
> until the hanging problem is solved ) is that rsync complains that
> it can't open a whole set of files /proc/xxx . Which in some sense
> is OK since find does the same thing, but I've tried various form
> of excludes:
> rsync -avv --exclude=/proc /  /mirror
> rsync -avv --exclude=/proc/ /  /mirror
> rsync -avv --exclude="/proc" /  /mirror
> rsync -avv --exclude="/proc/" /  /mirror
> rsync -avv --exclude=proc/ /  /mirror
> rsync -avv --exclude="proc/" /  /mirror
> and they all generate the errors about reading files of type /proc/xxx

I can't explain it.  I just tried the same thing and an exclude of /proc
resulted in a -vv message of
    excluding directory proc because of pattern /proc
and it never dips down into the /proc directory.  Is it perhaps complaining
about some /mirror/proc files that were copied before?

I believe that verbose message is only in the current CVS version of rsync,
not in any released version, but the I'm quite certain the functionality 
hasn't changed lately, just the message.  Did you say what version of rsync
you were using?

- Dave Dykstra

More information about the rsync mailing list