Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2009 18:39:55 +0100
From:      Roland Smith <>
To:        n dhert <>
Subject:   Re: moving an entire system
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 19, 2009 at 02:04:03PM +0100, n dhert wrote:
> I want to move the contents of a freebsd72 system entirely to different
> hardware (also Intel 64-bit), using dump/restore

If you are running a custom kernel, check that all the drivers for the new
hardware are in there! Or switch to the GENERIC kernel before making backup=

> These are the filesystems now:
> /dev/da0s1a     2026030    650876    1213072    35%    /
> /dev/da0s1e    20308398    652820   18030908     3%    /tmp
> /dev/da0s1f    95719170  12449998   75611640    14%    /usr
> /dev/da0s1d    20308398   2960282   15723446    16%    /var
> /dev/da1p1   2175407698 168279068 1833096016     8%    /home
> How should one proceed? I have an 286 Gb external USB disk formatted with=
> single
> slice large enough to hold all dumps of all fileystems, mounted on /seaga=
> /dev/da2s1a   283810126        12  260463064     0%    /seagate
> a. put the original machine in single-user mode
> b. use dump  (could L be left out if machine is in single-user mode?)

The L flag is used to denote a live (i.e. mounted) filesystem. So I would k=
it, unless you can unmount the filesystem you want to dump. If you are using
the -L flag there is no need to switch to single user mode.

> d. target machine, plug in the external USB disk and mount it
> # mkdir /seagate
> # mount /dev/da2s1a /seagate

Think about your filesystem (bsdlabel) sizes before you create them on the =
machine. If you want to change anything, now is the time. :-) From the look=
it you've got plenty of space, but maybe you want to make /home even bigger=
making /usr and /var smaller, or the other way around?
> e. restore file systems
> How exactly ?  is this ok for /home :
> # umount /home
> # /sbin/newfs /dev/da0s1g
> # /sbin/mount /dev/da0s1g /mnt
> # cd /mnt
> # /sbin/restore rf /seagate/dumpofhome.dmp
> # umount /mnt
> # mount /dev/da0s1g /home

That looks OK. Personally I always encrypt the partition that contains my /=
with geli(8):

geli init -l 256 /dev/da0s1g
geli attach /dev/da0s1g
newfs -U /dev/da0s1g.eli
mount /dev/da0s1g.eli /home

The geli init command will ask you to supply a password. The 'geli attach'
will ask for the newly chosen password before it created the encrypted
device. At the next boot you will be asked for the password before /home is
mounted. (Don't forget to change /etc/fstab accordingly!).

In the unfortunate case that your machine is stolen, encryption protects yo=
privacy by preventing others from reading your private data!

> for /tmp,  /usr and /var?

I wouldn't bother with making a backup of /tmp.

If your new hardware differs from the old one, you should check if to need =
adapt /boot/loader.conf, /etc/rc.conf (different network chip?) and
/etc/sysctl.conf (e.g. hw.snd.default_unit if the new machine has more than
one sound device). Also check if /etc/fstab is still valid. In general, che=
all configuration files that could have an inpact.

On the other hand, you might want to take the opportunity to switch to
8.0-PRERELEASE. In that cause you only have to backup your own data and the
system configuration files.

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v2.0.13 (FreeBSD)



Want to link to this message? Use this URL: <>