rsync 2.6.1cvs dumps core when preserve_hard_links and backup

jw schultz jw at pegasys.ws
Wed Feb 11 00:45:03 GMT 2004


On Tue, Feb 10, 2004 at 04:21:26PM -0800, Wayne Davison wrote:
> On Tue, Feb 10, 2004 at 03:26:15PM -0800, jw schultz wrote:
> > CVS has a simplified test now that should avoid the segfault.
> > It is just for a verbose message.
> 
> I don't see how the message is useful at all since the code should never
> call down to keep_backup() with anything but the one "lead" member of
> the group of hard-linked files.  In older versions of rsync I don't see
> how it would ever have been output.  In the CVS version it looks like it
> might get output if we're transferring the non-first item in the list of
> hard-linked files, but I think we need to change the backup code to deal
> with this.
> 
> One solution would be to create a set of hard-links in the backup dir
> whenever one of the hard-linked files changes (the current code only
> backs up the lead file, creating no hard links to the other names).
> Another solution would be to use the name of the lead file in the group
> as the backup file name, even if we're transferring a file from further
> down in the list.  I don't like this solution because it can still be
> inconsistent if the head file in the group changes.

The current code (what i checked in earlier today) doesn't
care where in the set of hard-links the file came from.  The
receiver only processes one in the set anyway.  The message
is only printed if -vv.

I changed the message to "%s was a hard link" for now.
Perhaps someone who useds -vv with --backup_dir could speak
as to how they would like this message, or not.

Ultimately what should be happening is to create the full
set of backup hardlinks but the generator has to be
responsible for that.  A bigger problem there is that by the
time we know we have to create hardlinks of backups we no
longer have the original set.  It might be possible using
--delete-after to make do_hard_links cognizant of the
backups.

Overall i'm thinking that backups have probably never been
that robust with regards to hardlinks.  If someone is doing
decremental restores that is probably mostly OK as long as
they overwrite rather than replace.  The ugly part is that
unless you keep the -vv log messages you won't even know a
hardlink set was updated and even with that info you only
know about one of a set of hardlinks being updated, not the
other members.  I'd avoid doing decremental backups with
rsync if hardlinks are involved, but then i never cared for
decremental backups.



-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt


More information about the rsync mailing list