<div dir="ltr">You could rsync the current day4 dir to a day4.new dir, and list all the prior days as --link-dest options. Make sure that you're using the same xatt/acl options as your official backup command (the options may or may not be present) so that you are preserving the same level of info as the backup.  You also have the choice of copying the whole day4 dir or just the day4/pictures dir, as you see fit.<div><br></div><div>For example:</div><div><br></div><div><font face="monospace">rsync -aiv --link-dest=../day1 --link-dest=../day2 --link-dest=../day3 day4/ day4.new/</font></div><div><font face="monospace">mv day4 day4.bad</font></div><div><font face="monospace">mv day4.new day4</font></div><div><br></div><div>If you only want to reprocess the pictures subdir, just tweak the "day4/" arg to be "day4/pictures" (no trailing slash) and change the mv commands to deal with just that subdir.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">..wayne..</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 10, 2020 at 9:29 AM Chris Green via rsync <<a href="mailto:rsync@lists.samba.org">rsync@lists.samba.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I run a simple self written incremental backup system using rsync's<br>
--link-dest option.<br>
<br>
Occasionally, because I've moved things around or because I've done<br>
something else that breaks things, the hard links aren't created as<br>
they should be and I get a very space consuming backup increment.<br>
<br>
Is there any easy way that one can restore hard links in the *middle*<br>
of a series?  For example say I have:-<br>
<br>
    day1/pictures<br>
    day2/pictures<br>
    day3/pictures<br>
    day4/pictures<br>
    day5/pictures<br>
<br>
and I notice that day4/pictures is using as much space as<br>
day1/pictures but all the others are relatively small, i.e.<br>
day2 day3 and day5 have correctly hard linked to the previous day but<br>
day4 hasn't.<br>
<br>
It needs a tool that can scan day4, check a file is identical with the<br>
one in day3 then hardlink it without losing the link from day5.<br>
<br>
There's jdupes but that does lose the link from day5 so you'd have to<br>
apply it to all the directories after the one that's lost the links.<br>
<br>
<br>
<br>
-- <br>
Chris Green<br>
·<br>
<br>
<br>
-- <br>
Please use reply-all for most replies to avoid omitting the mailing list.<br>
To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync" rel="noreferrer" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="noreferrer" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
</blockquote></div>