-u updating too liberally

jw schultz jw at pegasys.ws
Tue Jun 10 22:41:45 EST 2003

On Tue, Jun 10, 2003 at 01:58:20PM +0200, Jesse F. Hughes wrote:
> Hey ho.
> I apologize for what must be a stupid question, but I couldn't find
> any relevant posts in the archives.

Not stupid, it's actually a pretty good question.

> I want a daily backup of my home directory to another machine.
> Because I never delete any file, no matter how bloody useless, my home
> directory is inordinately large.  So, it is important that I only back
> up those files that really need to be backed up.
> Here is the command I have been playing with.
>   rsync -Cavuz -e ssh /home/ twoface:/backups/pw/home/
> However, it seems I am mis-using the -u option, or something.  For
> instance, when I add the -n option, rsync reports that it will update 
> home/jesse/tex/Papers/Jesse/coequations/Horn.tex
> But, I see locally and on twoface, resp.:
> -rw-r-----    1 jesse    users       72887 Nov 12  2002
> /home/jesse/tex/Papers/Jesse/coequations/Horn.tex
> -rw-r-----    1 1000     users       72887 Nov 12  2002
> /backups/pw/home/jesse/tex/Papers/Jesse/coequations/Horn.tex 

Hmm,  It looks like you have a uid issue.  That won't cause
it to actually transfer any data, just perform a chown. You
are running the rsync as root so it can do a chown.

> So, it looks like Horn.tex should *not* be copied to twoface.  It is
> up-to-date.
> As far as I can tell, *every* file is marked for update to twoface.
> This is so even if I touch a file on twoface, so that it is much more
> recent than the corresponding file on the local machine.  It's as if I
> have the -I option invoked somehow.
> What am I doing wrong?

Either use the --numeric-ids option, don't use the --owner
option (part of -a), or add jesse to /etc/passwd on twoface.

As an aside, i don't think you quite grasp the purpose of
the -u option.  In the scenario you describe it doesn't seem
to be serving any purpose.  You just don't want to use

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt

More information about the rsync mailing list