Date: Fri, 25 Aug 2017 00:02:20 -0300 From: Mikhail Goriachev <mikhailg@webanoide.org> To: freebsd-questions@freebsd.org Subject: Re: Anything specific to keep in mind restoring from rsync ? Message-ID: <a0e8e9fe-b251-6067-f4dc-6c243cb157cf@webanoide.org> In-Reply-To: <alpine.BSF.2.21.1708241829550.82696@wonkity.com> References: <VI1PR02MB1200E48789933A9BCAAAECD4F6800@VI1PR02MB1200.eurprd02.prod.outlook.com> <20170818074902.GA91334@gmail.com> <VI1PR02MB1200A074E97E82E758827E91F6800@VI1PR02MB1200.eurprd02.prod.outlook.com> <alpine.BSF.2.21.1708241026360.23386@wonkity.com> <VI1PR02MB1200FC78BA6AFD1C93CA9323F69B0@VI1PR02MB1200.eurprd02.prod.outlook.com> <alpine.BSF.2.21.1708241829550.82696@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a0e8e9fe-b251-6067-f4dc-6c243cb157cf>