Web lists-archives.com

Re: MBR partitioning, and content after partition table but before first partition




On 2017-03-13 at 23:36, David Christensen wrote:

> On 03/13/2017 02:01 AM, Jonathan Dowland wrote:
> 
>> On Fri, Mar 10, 2017 at 10:00:45PM -0800, David Christensen wrote:

>> and the destination ended up bigger, possibly because one or more
>> of the backups on the source had been using some kind of hardlink
>> de-dupe (I've ranted about hardlink trees being a problem in 
>> various backup topics on -user, too...) and I didn't think to
>> supply -S to rsync.
> 
> -S is for sparse files.
> 
> 
> Doing a quick test, it appears that rsync copies hard linked files as
> if each were a different file:

<snip>

As already mentioned, you need the '-H' option to rsync for that. My
standard rsync invocation is with '-avPH', just in case the tree being
copied has any hardlinks.

(You may want to check whether the resulting files are hardlinked back
to the ones in the original tree; I haven't tested, and from reading the
man page it doesn't seem entirely clear.)

> Is anyone aware of a utility that can walk a file system and replace
>  identical files with hard links?

Try rdfind. It's in Debian; I don't use it myself, largely because the
(accepted upstream years ago) feature request for a "-minsize" option
(to replace or extend the "-ignoreempty" option) which I need for my use
case has not apparently been implemented yet - but finding duplicate
files is exactly what it's meant for, and one of its available "actions"
is to replace the duplicate files with hardlinks.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature