Copying system/ports configuration?

Peter Schuller peter.schuller at infidyne.com
Wed Dec 17 18:13:53 UTC 2008


> The last time i did this it took a lot of time to get the VM set up--installing all the right ports, getting the database configuration right, etc.
> 
> Are there any shortcuts for this, e.g. a way i can automatically install the same ports on the new "machine"? I didnt see anything in the handbook or FAQ about this, but id think that people need to do this all the time. Any other advice for mirroring the system?

Opinions definitely vary on what the best method is.

What I do nowadays is to:

  * First of all, never ever interactively configure any ports.
  * Maintain any necessary global options in /etc/make.conf
  * Maintain port specific options in /usr/local/etc/ports.conf,
    and have it applied by ports-mgmt/portconf.
  * Keep a list of packages that I want installed (NOT including
    dependencies).

I then build packages based on this information in a clean
environment; typically a dedicated jail. Because all configuration is
declarative, and nothing is a function of interactive dialogs, I know
I can reproduce the package set + config at any time.

The upgrade on the target machine is a matter of pkg_delete -a to
remove all packages, and then re-installing all the built
binaries.

I have some tools to help me do this that are semi-public, but not
really in a nice state at this time. Let me know off-list if you would
be interested.

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller at infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey at scode.org
E-Mail: peter.schuller at infidyne.com Web: http://www.scode.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20081217/d7c516cb/attachment.pgp


More information about the freebsd-questions mailing list