Migrating Freebsd 6 data to new Freebsd 8 machine

Hi all,

I had to migrate all data(web server, mail server etc) from a machine with Freebsd 6 to a new machine with a clean install of Freebsd 8. I'm a newbie and I really need some advices from experienced users. Please help me.
Thank you!
 
Compare/sync your /etc/master.passwd and /etc/group file to have all accounts on the new machine before you use rsync for other data, then rebuild the passwd.db (by executing vipw save and quit).

Figure out all the packages on the old machine (how they are configured/build) and what changed if something is outdated.
For self build packages you can get a good overview with the options file in /var/db/ports.
Example postfix, is it a stock postfix (default options or customized postges/mysql, vda ...) same for all the other packages.

Transfer /var/db/ports directory and the /usr/local/etc folder for example via rsync to the new machine, then install/build all packages on the new machine (start with major ports for example postfix, dovecot, apache).

Datebases => dump => restore on the new machine => test with sql command interface.
Data (/var/mail, /usr/home and other data directories can be transferd with rsync)

Test all applications on the new machine if anything is OK you can swap the IP from both machines and test again.

To get a quick overview if a important package is missing
# pkg_info -qoa | sort > packages_6
# pkg_info -qoa | sort > packages_8

transfer packages_6 to the 8 host and
# diff -u packages_6 packages_8| more

Make sure you have all the time access to both machines to fix or swap back.

It is nearly impossible to write a full howto and what to transfer, you have to know this for your machine.
 
slightly different question

what about migrating from 6 to 8 using a full source build? Any particular caveats? Should I go through 7 first or directly from 6 to 8 is ok?
 
You can build 8 from 6, no problem. But I suggest that you remove all your ports that you have installed and read the upgrading from source manual in FreeBSD handbook.
 
6.x->8.x should work. If you're not pressed for time, go ahead and run your buildworld, buildkernel, make sure you have a 6.x kernel to fall back on, install the new kernel, boot into single-user mode and before you run installworld try to execute /usr/obj/usr/src/bin/sh/sh (I believe), and maybe a few others. You can pretty easily back out of a borked kernel, but a screwed up world usually means a fixit disk.

Another option is to use freebsd-update(8) to get to 8.x and then rebuild from source to get exactly where you want to be.
 
While it might (or might not) work to upgrade directly from 6.x to 8.x, the recommended (safer) route is:
  1. upgrade to the latest 6.x release
  2. upgrade to 7.0
  3. upgrade to the latest 7.x release
  4. upgrade to 8.0

The upgrade process is only guaranteed to work for X.A --> X.Z, and from X.Z to Y.0. Anything else is unsupported and may or may not work.

There's nothing stopping you from trying, but you can't complain if things break and you lose everything. :)
 
If you are running Samba too and have Chinese Character file name/direcctory you should also convert it from the Samba tools to UTF8 too or you will see Garbled character in your Windows Clinet.
 
Hmm, this is my home gateway which contains my mail server and a whole bunch of services for my home. It started out as a 4.x box. So removing all ports isn't really an option. This is why it's been sitting at 6-stable for some time, but would like to go to 8 now. I may go through 7.0->7-stable just to be on the safe side.
 
Seriously, it may be easier, safer, and less stressful to back up everything you want to keep from the 6 install then make a fresh 8 install.

Or better yet, if you have another HD, make a fresh 8 install on it. Then transfer all you need from the 6 HD to it. If something goes wrong you just have to put the working 6 install back in. Just my 2 cents. I don't like surprises.
 
Back
Top