rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Suggestion for documentation change


From: dean gaudet
Subject: Re: [rdiff-backup-users] Suggestion for documentation change
Date: Sun, 19 Nov 2006 21:25:27 -0800 (PST)

On Sun, 19 Nov 2006, Andrew Ferguson wrote:

> dean gaudet wrote:
> > yep -- but we could store an actual 0-length file instead... so we're not 
> > wasting an entire disk block on many filesystems.  better to name it 
> > .nodiff or something else so we can distinguish between an incompletely 
> > written .diff.gz and a file with no differences.
> 
> Examining the .diff that gets written, it consists of only a few bytes:
> - the magic number
> - a copy command
> - the byte to start the copy from (0)
> - the length of the copy (here, equal to the length of the file)
> - null byte end code
> 
> So, either rdiff-backup can check for .diff files of this type, or we
> can change how it checks for file differences that trigger calls to the
> rsync lib. Dean, any thoughts on this one?

oh the problem isn't as bad as i thought is it?  rdiff-backup cares about 
dev:ino only for hardlink comparisons.  the only way i can get DeviceLoc 
and Inode fields into the metadata file is to create hardlinks.

this begs the question:  why is a dev:ino difference considered sufficient 
reason to generate a .diff for a hardlinked file when it's not considered 
at all for an unhardlinked file?

we can go either way on that... we can say that --no-compare-inode should 
be the default, or we can say that we should store dev:ino info for all 
files (metadata bloat) because otherwise the rare instance of all the 
other parameters matching (size, mtime) but the inode having changed are 
slipping through the cracks on non-hardlinked files.

the simple solution is to make --no-compare-inode the default.

using dev:ino from session to session is fraught with peril because there 
are commonly used filesystems with no fixed dev:ino... and there are many 
common reasons for at least dev to change without ino changing.

actually i think the man page is totally misleading -- --no-compare-inode 
affects *only* hardlinked files.  it doesn't affect any other files.

i committed the change below to the documentation... but honestly i'm 
leaning towards making --no-compare-inode the default and supplying a 
--compare-inode option to enable the current behaviour for people who are 
absolutely certain their dev:ino mapping won't change.

-dean


Index: rdiff-backup.1
===================================================================
RCS file: /cvsroot/rdiff-backup/rdiff-backup/rdiff-backup.1,v
retrieving revision 1.81
diff -p -u -u -r1.81 rdiff-backup.1
--- rdiff-backup.1      12 Nov 2006 06:46:39 -0000      1.81
+++ rdiff-backup.1      20 Nov 2006 05:22:24 -0000
@@ -305,12 +305,15 @@ No Access Control Lists - disable backup
 Disable backup of MacOS X carbonfile information
 .TP
 .B \-\-no-compare-inode
-This relatively esoteric option prevents rdiff-backup from flagging a
-file as changed when its inode changes.  This option may be useful if
-you are backing up two different directories to the same rdiff-backup
-destination directory.  The downside is that hard link information may
-get messed up, as the metadata file may no longer have the correct
-inode information.
+This option prevents rdiff-backup from flagging a hardlinked file as changed
+when its device number and/or inode changes.  This option is useful in
+situations where the source filesystem lacks persistent device and/or inode
+numbering.  For example, network filesystems may have mount-to-mount
+differences in their device number (but possibly stable inode numbers);
+USB/1394 devices may come up at different device numbers each remount (but
+would generally have same inode number); and there are filesystems which
+don't even have the same inode numbers from use to use.  Without the
+option rdiff-backup may generate unnecessary numbers of tiny diff files.
 .TP
 .B \-\-no-compression
 Disable the default gzip compression of most of the .snapshot and .diff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]