On Thu, Jun 29, 2000 at 08:39:21AM +1000, Jeremy Hansen wrote:
> 
> I seem to be having a problem with --delete-excluded or I'm probably just
> doing something wrong, I'm sure it's the second.  Here's what I'm doing.
> 
> I have an nfs mounted volume under:
> 
> /mnt/nfs
> 
> and I would like to sync a local volume with the contents of
> /mnt/nfs.  /mnt/nfs changes quite often and files and directories get
> removed, so I'd like whatever the directory structure is in /mnt/nfs to be
> mirrors on the local volume.  Using --delete-excluded I thought would do
> this for me.  What I'm seeing though is that it works for files that have
> changes, but not directory structures that have changed.  For example:
> 
> if I have /mnt/nfs/RedHat/RPMS/filename-0.1.i386.rpm and it changes to
> /mnt/nfs/RedHat/RPMS/filename-0.2.i386.rpm, this works fine.  The old
> version is removed from the local volume and the new version is
> sync'd.  But if I have /mnt/nfs/ks/ks.img and /mnt/nfs/ks gets removed
> completely from the nfs volume, then when I run rsync, rsync does touch
> the /mnt/LOCAL/ks/ks.img.  So what am I doing wrong?  Here's my exact
> command line:
> 
> rsync -vrulHpogDtSz --delete-excluded /mnt/nfs/* /mnt/LOCAL
> 
> Also is there a switch to rsync that just summarizes all these
> options?  Something that just says preserves everything?
> 
> Oh, I'm using rsync 2.4.3 on both sides.


If you don't have any --exclude or --include then --delete-excluded is
exactly the same as --delete.

Your problem is the "*" in "/mnt/nfs/*".  Change that to "/mnt/nfs/" to
direct rsync to look through the entire /mnt/nfs directory and not just
at the currently existing files/directories there.

- Dave Dykstra

Reply via email to