>From TODO:

  We can also have the case where there are links to a file that are
  not in the tree being transferred.  There's nothing we can do about
  that.  Because we rename the destination into place after writing,
  any hardlinks to the old file are always going to be orphaned.  In
  fact that is almost necessary because otherwise we'd get really
  confused if we were generating checksums for one name of a file and
  modifying another.


>From Mike Rubel's excellent incremental backups HOWTO:
<http://www.mikerubel.org/computers/rsync_snapshots/#Bugs>

  As-written, the snapshot system above does not properly maintain old
  ownerships/ permissions; if a file's ownership or permissions are
  changed in place, then the new ownership/permissions will apply to older
  snapshots as well.  This is because rsync does not unlink files prior to
  changing them if the only changes are ownership/permission.  Thanks to
  J.W. Schultz for pointing this out.  This is not a problem for me, but
  slightly more complicated workarounds are possible


I'd personally like to see an option to force rsync to break-and-copy any
hardlink that pointed outside of the destination tree before doing -any-
changes, even metadata.

I know that this "breaks" standard hardlink semantics, but it's a
desirable breakage for building these nice incremental backup systems :)
I'm willing to eat the space taken by duplicating the entire file, since
the obvious alternative (using LVM snapshots to preserve -everything-
about the previous versions) has its own critical drawback (the danger of
running out of space on the snapshot limits how long a given snapshot can
stick around on the system).


I rooted around in the sources tonight to see if I could easily add such
an option (or, at least, as a temporary hack, hardcode the behaviour), but
I don't yet have the full flow of the source in my head, so I'm not sure
how to make the patch in the spirit of the rest of the code.

It looks like I should make the change in generator.c : recv_generator,
but I'm not quite sure of the repercussions of "copying" the various sorts
of files the link target might be. Actually, I guess I'm unfamiliar enough
with hardlinks to not even know what I can hardlink to :)

Sorry for rambling... I guess I'm saying I'd love to write this patch with
just a tiny bit of guidance :)

Thanks!

- t.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to