Welcome! » Log In » Create A New Profile

Rdiff creating a patch file, when there are no changes to th

Posted by Anonymous 
Rdiff creating a patch file, when there are no changes to th
March 25, 2004 04:07PM
I have a file that when I do;

rdiff signature Changes sig

rdiff delta sig Changes patch

I end up with a 14 byte patch file, even thou there are no changes
between the file... It is the same file.......

Thoughts anyone?
Rdiff creating a patch file, when there are no changes to th
March 25, 2004 05:29PM
On 26 Mar 2004, Fran Firman <fran < at > netgate.net.nz> wrote:
[quote]I have a file that when I do;

rdiff signature Changes sig

rdiff delta sig Changes patch

I end up with a 14 byte patch file, even thou there are no changes
between the file... It is the same file.......
[/quote]
Try rdiff delta -v

The delta probably says, in English:

This is an rsync delta
Copy the whole original file

In other words it's a stub diff.

I would have expected rdiff-backup would check the times first or
something...

--
Martin
Rdiff creating a patch file, when there are no changes to th
March 25, 2004 06:00PM
You are almost correct.... :)

I did some reading of the rdiff method.

It breaks the old file in to chunks, and creates hashs of the chunks.

Then sends the hashs over to the other server.

Then tries to find data in the other file that matchs the hashs. The
hashs don't have to be in the same place.

Then it will provide a patch file.

So something like this.

Old file = abcdefabc

New file = abcdefabc

ie no changes

the patch file might say thou...

use offset 7, length 3 = offset 1 and offset 7
use offset 3, length 3 = offset 3

Even thou the file hasn't changed.

Go figure.

I found all this out, when I started using the file-statics files, to
tell me what had changed for an ids system, but I kept getting messages
that files had changed, when they hadn't. And it was always the same
files too.

So I am adding in extra stuff to my script that takes the list of
possible changes, and does an md5sum of them to see if the files really
have changed, before alarming about them.

F.

On Fri, 2004-03-26 at 12:44, Martin Pool wrote:
[quote]On 26 Mar 2004, Fran Firman <fran < at > netgate.net.nz> wrote:
[quote]I have a file that when I do;

rdiff signature Changes sig

rdiff delta sig Changes patch

I end up with a 14 byte patch file, even thou there are no changes
between the file... It is the same file.......
[/quote]
Try rdiff delta -v

The delta probably says, in English:

This is an rsync delta
Copy the whole original file

In other words it's a stub diff.

I would have expected rdiff-backup would check the times first or
something...[/quote]
Rdiff creating a patch file, when there are no changes to th
March 25, 2004 06:09PM
On 26 Mar 2004, Fran Firman <fran < at > netgate.net.nz> wrote:

[quote]use offset 7, length 3 = offset 1 and offset 7
use offset 3, length 3 = offset 3
[/quote]
Right, I was summarizing. The actual output will be

COPY 0 8
END

but there are some cases where it will give slightly too many copy
commands.

[quote]I found all this out, when I started using the file-statics files, to
tell me what had changed for an ids system, but I kept getting messages
that files had changed, when they hadn't. And it was always the same
files too.
[/quote]
What has changed? Just the atime? The source file should not be
rewritten at all.

--
Martin
Rdiff creating a patch file, when there are no changes to th
April 04, 2004 05:29PM
On 26 Mar 2004, Martin Pool <mbp < at > samba.org> wrote:
[quote]On 26 Mar 2004, Fran Firman <fran < at > netgate.net.nz> wrote:
[quote]I end up with a 14 byte patch file, even thou there are no changes
between the file... It is the same file.......
[/quote]
I would have expected rdiff-backup would check the times first or
something...
[/quote]
heh i was about to write up a bug report about this too -- i just upgraded
rdiff-backup from 0.11.0 to 0.13.x and while testing i noticed lots of
"useless" increment files. (somehow i never noticed them before.)

the option i was considering was to have rdiff-backup have some threshold
for small patches below which it tries applying the patch and looks for a
difference, and deletes the patch if it's a NOP.

-dean
Sorry, only registered users may post in this forum.

Click here to login