Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2009 21:49:01 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        PJ <af.gourmet@videotron.ca>, freebsd-questions@freebsd.org
Subject:   Re: backups & cloning
Message-ID:  <alpine.BSF.2.00.0909292144050.45516@wonkity.com>
In-Reply-To: <alpine.BSF.2.00.0909292128150.45380@wonkity.com>
References:  <4AC29BE6.4000505@videotron.ca> <alpine.BSF.2.00.0909291759110.44648@wonkity.com> <4AC2B3BB.4080807@videotron.ca> <20090930040733.91cc32d4.freebsd@edvax.de> <4AC2C6FE.5030507@videotron.ca> <20090930051819.be26dc3b.freebsd@edvax.de> <alpine.BSF.2.00.0909292128150.45380@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Sep 2009, Warren Block wrote:

> On Wed, 30 Sep 2009, Polytropon wrote:
>
>> On Tue, 29 Sep 2009 22:48:30 -0400, PJ <af.gourmet@videotron.ca> wrote:
>>> Duh.... I think I see where this is leading... I'm pretty sure it was
>>> issued from / which makes it redundant, right? I should have issued it
>>> from somewhere else, like from home, usr or whatever but not from / as
>>> that is what I was trying to dump.... :-[
>> 
>> The working directory does only matter to the restore command.
>> The dump command just cares for the partition name. In order
>> to find out what partition corresponds with which subtree,
>> check /etc/fstab or run the
>>
>> 	# mount
>> 	/dev/ad0s1a on / (ufs, local)
>> 	/dev/ad0s1d on /tmp (ufs, local, soft-updates)
>> 	/dev/ad0s1e on /var (ufs, local, soft-updates)
>> 	/dev/ad0s1f on /usr (ufs, local, soft-updates)
>> 	/dev/ad0s1g on /export/home (ufs, local, soft-updates)
>> 
>> command, as in the example above.
>
> Why make it harder than it needs to be?  Call it / or /var or /usr instead of 
> /dev/ad0s1whatever.  dump will handle it.  It's built for that.  If it's a 
> live filesystem, add -L.
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html#AEN25814

Just to add a possibly more relevant example from the FAQ:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK

That example has the user connect the new disk to the old system.  That 
works, but I've always felt it's too easy to get the disks mixed up and 
write to the wrong one.  So usually I back up /, /var, and /usr to files 
on a USB disk or sshfs.  Then I switch to the new target system, booting 
it with a FreeBSD disk and doing a minimal install.  That makes sure the 
MBR is installed, gives me a chance to set all the filesystem sizes, and 
newfses them.

Then I restore from the dump files created earlier, over the running 
system.  First /usr, then /var, then /.  On reboot, it's a clone.

-Warren Block * Rapid City, South Dakota USA



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0909292144050.45516>