From owner-freebsd-questions@freebsd.org Fri Aug 25 00:33:06 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 1046FDEBB78 for ; Fri, 25 Aug 2017 00:33:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay11.qsc.de (mailrelay11.qsc.de [212.99.187.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 704F66C4AB for ; Fri, 25 Aug 2017 00:33:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay11.qsc.de; Fri, 25 Aug 2017 02:32:39 +0200 Received: from r56.edvax.de (port-92-195-85-107.dynamic.qsc.de [92.195.85.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 942AA3C77D; Fri, 25 Aug 2017 02:32:38 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v7P0WbFB003476; Fri, 25 Aug 2017 02:32:37 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 25 Aug 2017 02:32:37 +0200 From: Polytropon To: Manish Jain Cc: "freebsd-questions@freebsd.org" Subject: Re: Anything specific to keep in mind restoring from rsync ? Message-Id: <20170825023237.9b6b22b2.freebsd@edvax.de> In-Reply-To: References: <20170818074902.GA91334@gmail.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay11.qsc.de with EDE216A3560 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1413 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 00:33:06 -0000 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, where all programs are in fact the same (one) binary, hardlinked to several names. Use "ls -i" to verify - they all have the same inode number. Furthermore, /bin/test and /bin/[; /bin/rm and /bin/unlink; /bin/ln and /bin/link. There are even more in /usr/bin. Several ports also install hardlinked files, and it's not entirely uncommon that they also exist at user level, inside a user's home directory. Here's a sh one-liner where you can set $SP ("search path") and see which hard links do exist, sorted by inode number. SP="/usr/bin"; for INODE in `ls -i ${SP} | sort -n | awk '{ print $1 }' | uniq -d`; do ls -i ${SP} | grep ${INODE}; echo ""; done Additionally, dump | restore handles special flags in the desired manner (such as the schg flag; see "man chflags" for details). That's why it's the preferred method to make 1:1 file system content copies on UFS (not _clone_ whole disks and partitions, though). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...