From owner-freebsd-questions@freebsd.org Fri Aug 25 03:03:36 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 24681DEDD6E for ; Fri, 25 Aug 2017 03:03:36 +0000 (UTC) (envelope-from mikhailg@webanoide.org) Received: from msa.san.navalradio.net (msa.san.navalradio.net [206.251.255.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00D6E703EA for ; Fri, 25 Aug 2017 03:03:35 +0000 (UTC) (envelope-from mikhailg@webanoide.org) Received: from [192.168.0.121] ([172.18.128.200]) (authenticated bits=0) by msa.san.navalradio.net (8.15.2/8.15.2) with ESMTPA id v7P31Pve003596 for ; Fri, 25 Aug 2017 03:01:25 GMT (envelope-from mikhailg@webanoide.org) X-Authentication-Warning: msa.san.navalradio.net: Host [172.18.128.200] claimed to be [192.168.0.121] Subject: Re: Anything specific to keep in mind restoring from rsync ? To: freebsd-questions@freebsd.org References: <20170818074902.GA91334@gmail.com> From: Mikhail Goriachev Message-ID: Date: Fri, 25 Aug 2017 00:02:20 -0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 03:03:36 -0000 On 24/08/2017 21:37, Warren Block wrote: > 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 Nice one! I got into habit of the following, which "passes" that test: # du -hd1 /rescue 7.7M /rescue # tar -cf - -C / rescue | tar -xf - -C /tmp # du -hd1 /tmp/rescue 7.7M /tmp/rescue Cheers, Mikhail. -- Mikhail Goriachev Webanoide