rsync --link-dest option with the destination directory containing old files.

Dave Dykstra dwdrsync at
Tue Dec 23 21:07:17 GMT 2008

On Tue, Dec 23, 2008 at 01:52:21PM -0500, Matt McCutchen wrote:
> On Tue, 2008-12-23 at 23:45 +1100, David Overton wrote:
> > I would also very much like to see this feature. Indeed, this seems
> > far more logical than the current --link-dest behaviour and it's what
> > I assumed --link-dest would do until I read the man page thoroughly
> > (you have to follow the references back from --link-dest to
> > --copy-dest and then --compare-dest and even then the only mention of
> > the actual behaviour is a parenthesised comment "(if the files are
> > missing in the destination directory)"). I be interested to know what
> > use cases the current behaviour was designed for, because I can't
> > see any advantage to not making use of the --link-dest file if it's
> > available. Providing the proposed alternative behaviour as an extra
> > option, if not the default for --link-dest, would be very useful.
> I too find the current semantics of basis dirs illogical and would
> support an option for better semantics (though I think we should avoid
> changing defaults some users may be relying on).  That's why I entered a
> series of enhancement requests, the first of which is Robert's proposal:
> I would consider it worth forking rsync to have these features, if I
> ever got around to doing so.

It (that is, the proposal in your bug first report) sounds like not
a very difficult or intrusive addition to me, and useful for rotating
backups.  Wayne said he wouldn't write it, but maybe he'd accept it
if someone else wrote it.  That would be better than forking unless
it is more intrusive than it seems.

(I'm taking an interest because I contributed the code for the
original --*-dest option --compare-dest and that is primarily what
pulled me in to maintaining rsync for a year or so.  I also integrated
JW Schultz's --link-dest.  --*dest options have evolved quite a bit
since then I see.)

- Dave

More information about the rsync mailing list