On Mon, Aug 07, 2000 at 06:28:46PM +1000, Magnus Sandberg wrote:
> Hi,
>
> I just sent a subscribe mail to listproc and I don't know if I'm added yet.
>
> I have an idea of a new switch, maybe called --dont-delete
>
> I'm running some unofficial mirrors for debian and helix-gnome.
>
> I use the switches "-rltvz --delete --delete-excluded" together with a
> number of --include and --exclude switches.
>
> My problem is that I touch a "lock-file" within the archive tree to prevent
> dual runs and to inform users that a update is running.
>
> The problems is that my "lock-file" is removed together with all other
> obsolete files at the beginning if the rsync-session. My script gets
> confused when it is no lock-file to delete afterwards.
>
> I guess that the problem is the --delete--excluded which would clean out
> all excluded files and all non existing files on the master site.
>
> I would like to have a new switch that tells rsync to not delete some files
> even if they don't exist on the master site.
I have also recently ran into a case where I wanted --delete-excluded
semantics on some excluded files and not on others. It would be nice to be
able to split them up somehow. Maybe there would need to be some special
character at the beginning of an exclude pattern or something like that.
The implementation of --delete-excluded is pretty simple: to cause deletion
of excluded files rsync just skips sending the exclude patterns to the
receiver, so it could be modified to only send the patterns that do (or
don't) start with the special character. Alternatively, perhaps an ordering
could be done on the command line such that all exclude/include patterns
before a --delete-rest-excluded would not be deleted and all of the rest
of them would.
- Dave Dykstra