Re: rsync and file renaming

From: Christopher Browne (cbbrowne_at_acm.org)
Date: 07/01/04


Date: 1 Jul 2004 03:54:57 GMT

In the last exciting episode, BDB <noemail@yahoo.com> wrote:
> Robert M. Riches Jr. wrote:
>>
>> Yikes!!! Let's say the source and destination directories
>> have _ONLY_ about 500 files each. (The RPMS directory on
>> the update mirrors has over 200 or 250, so that isn't too
>> absurd a number.) Do you really expect rsync to do 250,000
>> checksum comparisons to figure out what files on side A
>> might happen to be equivalent to files of other names on
>> side B? How about if a half dozen files on side A happen to
>> have the same checksum and contents (as each other), while
>> three or four files with different names on side B have the
>> same checksum and contents (as each other and as those on
>> side A). Shudder...

> Geez. OK, I'm sorry I ever mentioned rsync. Let me rephrase the
> question. Are there any utilities or scripts that I should look
> into to help me syncronize file/directory name changes between two
> directory trees.

If you're _commonly_ doing that, then it makes sense to consider doing
md5 checksums of all the files, and then looking for matches to try to
"tune" for those cases.

If that sort of thing is typical, then you might be better off using a
Logical Volume Manager to keep the "slave" systems synchronized with
the "master," so that the system actually intercepts the rename and
applies it on the destination system(s).

There are a number of approaches to "replication" that are in use in
varying contexts; it turns out that _no_ method can be forcibly ideal,
as they all involve specific vital compromises that will compromise
usage for one purpose or another.

Personally, I really like Unison for file syncing, as it very
successfully copes with 2-way syncing such that I can make
modifications in any location and, with occasional intervention, get
them to propagate "everywhere." I have to live with "mv" being
treated as a reasonably expensive operation.

-- 
output = reverse("moc.enworbbc" "@" "enworbbc")
http://www3.sympatico.ca/cbbrowne/oses.html
"I can picture in my mind  a world without war,  a world without hate.
And I can picture us attacking that world, because they'd never expect
it."  -- Jack Handy


Relevant Pages

  • Re: rsync and file renaming
    ... Let's say the source and destination directories ... ]> have the same checksum and contents, ... I'm sorry I ever mentioned rsync. ... by copying over those bytes one by one from that one file on B. ...
    (comp.os.linux.misc)
  • Re: rsync and file renaming
    ... Let's say the source and destination directories ... > absurd a number.) ... > have the same checksum and contents, ... I'm sorry I ever mentioned rsync. ...
    (comp.os.linux.misc)
  • Re: rsync and file renaming
    ... see if any existing ones have the same checksum ... Let's say the source and destination directories ... One of the fundamental axioms behind rsync is that same ... axiom were thrown out and file C on side A was found to be ...
    (comp.os.linux.misc)
  • Re: XOR and String
    ... To get a whole picture please see http://www.epay.tj/img/MML-Packets.jpg ... I have the following string headers: ... As written in documentation, the checksum is "a negative value of the ...
    (microsoft.public.dotnet.languages.vb)