On Fri, 2006-02-10 at 15:53 +0100, Wiebe Cazemier wrote:
Ben,
A while back I suggested a feature to include hash-checks to determine
if files have changed or not, instead of the mtimes+size combo. I trust
you remember. I've been away from the list a while, and I see there has
been a poll. I didn't see this feature in the poll, but I'd like to
emphasise that it is quite important. I've just discovered another
situation in which mtime+size is not reliable. I'll explain:
if you have two files of equal size, but different contents, and copy
one over the other, the mtime of the target file is preserved. Now,
because the size and mtime haven't changed, rdiff-backup doesn't see it
as a change and doesn't back it up. This if course, would be very
undesirable.
Here is an example of what I mean:
================================
# lh
total 8.0K
-rw------- 1 [owner] users 16 Feb 10 15:46 a
-rw------- 1 [owner] users 16 Feb 10 15:47 b
# cat a;cat b
this is a file.
this is b file.
# cp a b
# lh
total 8.0K
-rw------- 1 [owner] users 16 Feb 10 15:46 a
-rw------- 1 [owner] users 16 Feb 10 15:47 b
# cat a;cat b
this is a file.
this is a file.
================================
I did the same and mtime has changed for me:
dd if=/dev/urandom of=a count=1
dd if=/dev/urandom of=b count=1
stat a b
File: `a'
Size: 512 Blocks: 8 IO Block: 131072 regular file
Device: 806h/2054d Inode: 2094563 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1001/kouzminv) Gid: ( 440/ vadiki)
Access: 2006-02-10 11:49:56.000000000 -0500
Modify: 2006-02-10 11:49:56.000000000 -0500
Change: 2006-02-10 11:49:56.000000000 -0500
File: `b'
Size: 512 Blocks: 8 IO Block: 131072 regular file
Device: 806h/2054d Inode: 2094711 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1001/kouzminv) Gid: ( 440/ vadiki)
Access: 2006-02-10 11:50:01.000000000 -0500
Modify: 2006-02-10 11:50:01.000000000 -0500
Change: 2006-02-10 11:50:01.000000000 -0500
cp a b
stat a b
File: `a'
Size: 512 Blocks: 8 IO Block: 131072 regular file
Device: 806h/2054d Inode: 2094563 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1001/kouzminv) Gid: ( 440/ vadiki)
Access: 2006-02-10 11:51:20.000000000 -0500
Modify: 2006-02-10 11:49:56.000000000 -0500
Change: 2006-02-10 11:49:56.000000000 -0500
File: `b'
Size: 512 Blocks: 8 IO Block: 131072 regular file
Device: 806h/2054d Inode: 2094711 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1001/kouzminv) Gid: ( 440/ vadiki)
Access: 2006-02-10 11:50:01.000000000 -0500
Modify: 2006-02-10 11:51:20.000000000 -0500
Change: 2006-02-10 11:51:20.000000000 -0500
Notice *** Modify: 2006-02-10 11:51:20.000000000 -0500 ***
I think you miss SECONDS in your lh listing. Looks like "b" was created
15:47 and then you copied a -> b at 15:47.
Vadim
I really think this feature should be part of the next stable release,
because now I can't fully trust my backup to be accurate.
On a sidenote, the wiki at
http://rdiff-backup.solutionsfirst.com.au/?SuggestedFeatures doesnt seem
to work, the articles are not accessible.
Regards,
Wiebe Cazemier
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:
http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
--
Vadim Kouzmine <kouzminv < at > gmail.com>