--link-dest --inplace updates files without unlinking. What to do?

Kevin Korb kmk at sanitarium.net
Fri Dec 26 20:20:51 MST 2014

Hash: SHA1

On 12/26/2014 09:56 PM, Askar Safin wrote:
>> I mean instead of having --link-dest=previous_backup and the
>> target being empty (or starting that way in your case) you cp -al
>> the prevous_backup to the new "incomplete" one.  Now you have a
>> tree full of all hard links.  Now you can rsync to the target
>> without any - --link-dest reference.
> I meant the same.
>> You are right about the other options except that you would now
>> need --delete as well.
> I have --delete-after.

Simply put, with --link-dest you don't need the overhead of any of the
- --delete options.  That is why I assumed you would have to add it if
you were switching to the old school method I was talking about.

>> Rsync will replace updated files as you described earlier, change
>> the metadata on the existing links as I described earlier, add
>> the new files, and delete the hard links cp made which are no
>> longer needed.
> Okey, I will stick with --link-dest, thanks a lot.
>> So, maybe I have extra copies of some php, html, and jpg files
>> but I know how they were at the time they were backed up.
> You can still do "cp -al" and backup "ls -lR" or "find -ls" output.
> :)

Yeah, I didn't want to make a reporting pass.  OTOH, I did end up
writing a tool to diff two rsync backup directories.  It has been
several years since I needed it.  The idea of adding an almost never
needed reporting pass to every run is simply crazy.  Let rsync report
what it did with almost no overhead at all.  If I need need to use my
diffing utility later then so be it.  It takes it about 1 minute per
100k files.  I have servers with 3m files on them.

> == Askar Safin http://vk.com/safinaskar Kazan, Russia

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
Version: GnuPG v2


More information about the rsync mailing list