moving an entire system

n dhert ndhert at gmail.com
Thu Nov 19 13:04:05 UTC 2009


I want to move the contents of a freebsd72 system entirely to different
hardware (also Intel 64-bit), using dump/restore
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 a
single
slice large enough to hold all dumps of all fileystems, mounted on /seagate
/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?)
/sbin/dump -0aL -f /seagate/dumpofroot.dmp /dev/da0s1a
/sbin/dump -0aL -f /seagate/dumpoftmp.dmp /dev/da0s1e
/sbin/dump -0aL -f /seagate/dumpofusr.dmp /dev/da0s1f
/sbin/dump -0aL -f /seagate/dumpofvar.dmp /dev/da0s1d
/sbin/dump -0aL -f /seagate/dumpofhome.dmp /dev/da1p1
c. on the target machine, do a complete install of freeBSD72 from CD with
same partition layout as original machine
(On the target machine /home will be on /dev/da0s1g (no longer on
/dev/da1p1))

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

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

for /tmp,  /usr and /var?
It is safe to use same procedure? or else, how to do ?

And what for /  file system ???
will same procedure work ?


More information about the freebsd-questions mailing list