Anything specific to keep in mind restoring from rsync ?

Warren Block wblock at wonkity.com
Fri Aug 25 00:37:37 UTC 2017


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.


More information about the freebsd-questions mailing list