From owner-freebsd-questions@freebsd.org Fri Aug 25 10:35:24 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57F82DD47AF for ; Fri, 25 Aug 2017 10:35:24 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BBA38066F for ; Fri, 25 Aug 2017 10:35:23 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id v7PAZHVd051676 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 Aug 2017 04:35:17 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id v7PAZHcL051673; Fri, 25 Aug 2017 04:35:17 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 25 Aug 2017 04:35:17 -0600 (MDT) From: Warren Block To: Manish Jain cc: Polytropon , "freebsd-questions@freebsd.org" Subject: Re: Anything specific to keep in mind restoring from rsync ? In-Reply-To: Message-ID: References: <20170818074902.GA91334@gmail.com> <20170825023237.9b6b22b2.freebsd@edvax.de> User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (wonkity.com [127.0.0.1]); Fri, 25 Aug 2017 04:35:18 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 10:35:24 -0000 On Fri, 25 Aug 2017, Manish Jain wrote: > > > On 08/25/17 06:02, Polytropon wrote: >> On Fri, 25 Aug 2017 00:13:38 +0000, Manish Jain wrote: >>> But I am inclined to ask one question here : does FreeBSD actually have >>> any system-installed hard links (other than . and ..) ? >> >> Several. A good example is the content of /rescue > > > So I learn from you/WB that I goofed up : - ) > > My /rescue indeed now has all files therein as separate files (unique > inodes). If the system has any more hard links, then my box would be > hosting them as separate files. > > Is it okay if I keep using this box as-is-now (no hard links) ? The box > runs fantastically well. I don't know what problems that might cause down the line. Another option would be to use rsync to re-sync at least the known problem directories. Some time back, I wrote a script to do a "slow mirror" of filesystems on an SSD to a hard disk. Here are the rsync options that seemed to get everything, as far as I could tell: -axHAXS --delete --fileflags --force-change Be careful, of course, with a backup first. --delete deletes files on the target that are not present on the source. Using that and running rsync from the original /rescue to the new target one ought to fix the problem. Like: rsync -axHAXS --delete --fileflags --force-change original/rescue/ /rescue/ Note the magic trailing slashes on the directories, meaning "do what I want". The last two options should be able to overwrite files with the schg flag set. A couple of years back, I submitted a bug report for rsync, and for a few happy months it was fixed. Then it broke again and has been that way ever since. So the few files in /usr/bin with that flag will show errors and possibly stop the copy (I forget now).