From owner-freebsd-questions@freebsd.org Fri Aug 25 00:37:37 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 72C94DEBD60 for ; Fri, 25 Aug 2017 00:37:37 +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 43F8E6C682 for ; Fri, 25 Aug 2017 00:37:36 +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 v7P0bT0J085305 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 24 Aug 2017 18:37:29 -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 v7P0bTON085287; Thu, 24 Aug 2017 18:37:29 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 24 Aug 2017 18:37:29 -0600 (MDT) From: Warren Block To: Manish Jain cc: Matt Smith , "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> 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]); Thu, 24 Aug 2017 18:37:29 -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 00:37:37 -0000 On Fri, 25 Aug 2017, Manish Jain wrote: > On 08/24/17 21:58, Warren Block wrote: >> Don't use rsync for this. If you do, be sure to add the half-dozen >> options that preserve hard links and keep the /rescue directory from >> growing unexpectedly. The preferred methods are dump/restore for UFS >> (http://www.wonkity.com/~wblock/docs/html/backup.html) and >> zfs send | zfs recv for ZFS. > > Thanks Warren, but too late : - ) > > I did an rsync (-aAXv --exclude-from ./excludes) to backup, and then a > reverse rsync (-aH) to restore. It worked very well for me - both for > Linux and FreeBSD. > > But there have been a few responses at freebsd-questions that > dump/restore should be the preferred solution for this (when / has to be > backed up, mainly owing to hard links). Next time I need a backup, I > will use dump+restore. > > But I am inclined to ask one question here : does FreeBSD actually have > any system-installed hard links (other than . and ..) ? Yes: % du -hd1 /rescue 9.6M /rescue % rsync -a /rescue/ /tmp/rescue/ % du -hd1 /tmp/rescue 1.3G /tmp/rescue There might be others, but those are the ones that always get me.