rsync NFS automount home directories, deletes on 2nd run

jw schultz jw at pegasys.ws
Tue Aug 26 06:27:11 EST 2003


On Mon, Aug 25, 2003 at 09:49:50AM -0700, Coert Vonk wrote:
> rsync'ing from NFS automounted /home directories does
> not appear to work as expected.
> 
> Initially it automounts all the home directories, and
> copies the tree.  However, when I run the same command
> a second time, it deletes all the files for with the
> /home directory happened to be unmounted.
> 
> Some more details:
> 
> Using 'ypmatch -k auto.home', I generate a list of
> /home/ directories to backup using ypmatch (see
> example below).
> 
> Because the directories are explicitly included in the
> 'include list', I would expect them to get
> automounted, and picked up by rsync.
> 
> I am using 2.5.6 with 
>   --include-from=see.example.below
>   --verbose --verbose
>   --archive
>   --delete --delete-excluded
>   /home/ /destination
> 
> $ cat see example.below
> + /cvonk/
> + /cvonk/*
> + /cvonk/**/
> + /cvonk/**/*
> + /kernel/
> + /kernel/*
> + /kernel/**/
> + /kernel/**/*
> + /cvsroot/
> + /cvsroot/*
> + /cvsroot/**/
> + /cvsroot/**/*
> - */
> 
> The double --verbose options, does not even mention
> the /home directories that are not already mounted.
> 
> suggestions?, thanks,
> /coert

Don't rsync an automount mount point assigned a map file.
Once started rsync cannot distinguish between a deleted
directory and an automount failure any more than rsync can
tell the difference between an empty directory and an
unmounted filesystem.

The best thing to do would be to use the file server, not
client as the rsync source.  Much more efficient.  If that
is not possible run a seperate rsync for each mapping with
browsing disabled if your OS supports browsing.

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

		Remember Cernan and Schmitt



More information about the rsync mailing list