How to import configuration FreeBSD files in a new machine?

Hi guys, I'm new FreeBSD user, and in my job has a FreeBSD running as router, and I need to "copy" all configuration to a new computer running another FreeBSD version.

How can I do it???

Current Version: FreeBSD 9.1
New Version: FreeBSD 11.0
 
Open a terminal to one, open another terminal to the second and copy/paste? For bigger files or directories you could use scp(1) or rsync(1). There's no "easy" export/import function if that's what you're looking for. Don't be tempted to blindly copy the whole /etc/ directory though. That's going to bite you as you will be overwriting rc(8) scripts on 11.0 with old versions from 9.1.
 
The difference between Linux and FreeBSD is that all non OS software configuration is kept under /usr/local/etc. So basically all the information you need is there. Since this is a router, you might also need to look at /etc. Like SirDice said do not just blindly copy /etc because you will have problems. Assuming that both boxes run the same software, you could blindly copy almost all contents of /usr/local/etc though.
 
After having transfered relevant files to /etc you are strongly encouraged to run mergemaster(8) which is known to be a little painful procedure but necessary to catchup changes between the versions.

I don't think that would work in this case since they are different machines. He could build the world of course but why bother?
 
I think the best way to do this is you need to learn the FreeBSD 9.1 Router you are upgrading.
The term router can encompass many things so you need to figure out what it is doing to transfer these features to a new build.
For example obviously /etc/rc.conf has some of the clues you need. Also check /boot/loader.conf.

Some basic questions you should ask yourself:
Is it running a firewall. If so which one and where does its configuration files reside.
Is it running a dns or dhcp server. If so these configuration files will also need recreating.

There are plenty more networking services that could be enabled in your /etc/rc.conf. You need to figure that bit out.
There could be services like bind still in use that could be upgraded.

I suggest taking notes of your old machine configuration files for future reference.

If this router is internet facing you really need to know what your doing. Otherwise your whole organization is at risk of mis-configuration.
 
Back
Top