Date: Wed, 17 Dec 2008 08:21:00 -0600 From: "Andrew Gould" <andrewlylegould@gmail.com> To: Mel <fbsd.questions@rachie.is-a-geek.net> Cc: freebsd-questions@freebsd.org, bg271828@yahoo.com Subject: Re: Copying system/ports configuration? Message-ID: <d356c5630812170621h497b9001nc423d939c31d1b48@mail.gmail.com> In-Reply-To: <200812170900.53046.fbsd.questions@rachie.is-a-geek.net> References: <829861.58495.qm@web53407.mail.re2.yahoo.com> <d356c5630812160716o368873f3k4d8e200836fc3b8b@mail.gmail.com> <200812170900.53046.fbsd.questions@rachie.is-a-geek.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 17, 2008 at 2:00 AM, Mel <fbsd.questions@rachie.is-a-geek.net>wrote: > On Tuesday 16 December 2008 16:16:27 Andrew Gould wrote: > > On Tue, Dec 16, 2008 at 9:03 AM, Dr. Jennifer Nussbaum > > > > <bg271828@yahoo.com>wrote: > > > I have a FreeBSD 7.0 system that im using in production. I want to > create > > > a FreeBSD virtual machine, to use as a testbed for this production box. > > > > > > 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? > > > > > > Thanks! > > > > > > Jen > > > > Someone once posted a shell script that obtained a list of installed > ports > > from the package database system and fed the results to pkg_create, which > > would create binary packages. Unfortunately, I can't locate the script. > > cd /var/db/pkg > mkdir /var/tmp/packages > for DIR in *; do > if test -d ${DIR} -a -f ${DIR}/+CONTENTS; do > pkg_create -vb ${DIR} /var/tmp/packages/${DIR}.tbz > fi > done > > This will create a package for all installed software in /var/tmp/packages. > Adjust accordingly. > > Once ssh is in place on target: > scp -rp /var/tmp/packages target.machine:/var/tmp > > On target: > cd /var/tmp/packages > for FILE in *; do pkg_add ${FILE}; done > > Then all that's left is /usr/local/etc/ and possibly some > dirs /usr/local/share. > -- > Mel > > Problem with today's modular software: they start with the modules > and never get to the software part. > Thanks, Mel. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d356c5630812170621h497b9001nc423d939c31d1b48>