No subject


Sun Jan 4 23:01:44 GMT 2004


  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.




More information about the rsync mailing list