Hard links not properly restored?

I tried out the Duplicacy CLI on OS X and found that hard links were restored as independent files. Is there some option to allow hard links to be restored as hard links?

I don’t think there’s such an option right now.

During backup Duplicacy doesn’t check if a file is a hard link or not, so the restore command can’t recover the hard links.

But, I think it is possible to introduce a new switch to the restore command, that will blindly create a hard link if a file to be restored happens to have the same file as another already restored file, regardless of whether they were hard linked before.

1 Like

I think this would be an acceptable solution,

Sorry, that is dangerous. Writing to hard-linked files will write to all copies. You don’t want to be linking files the user didn’t intend.

2 Likes

I think so too, that blindly creating hardlinks is dangerous. Wouldn’t it be possible to store inode information on each file and (optionally) use this information on restore? I myself would possibly try to contribute code to do that.

I’m not into the code yet, so a prediction of complexity would be nice from a pro. I would vote for integrating the feature in the master code … I would not be glad to see much forks which a user can’t merge anymore.

Yours
lopiuh

As an aside – restoring hard links is a fairly easy operation if you want to do that after the fact. There are several popular free tools which can search your server and suggest exact matches.