Re: Copying system/ports configuration?

2008-12-19 Thread Doug Barton
Bernard Dugas wrote:
 On Tue, 16 Dec 2008 09:26:05 -0800 (PST), Dr. Jennifer Nussbaum
 bg271828 at yahoo.com wrote:
 I dont quickly see a free tool to do this. Maybe its easier
 to do this from scratch
 
 I just found last week ports-mngnt/portmaster that can help you to do
 that, and i have suggested portmaster author to add an -export option
 readable to built new ports on another computer.
 
 May be an -export-packages option would be nice also ?

The process described in the portmaster man page is not quite as
simple as you seem to be asking for, but it is designed to be
thorough, and to work with a wide variety of configurations. It has
also been tested extensively.


hope this helps,

Doug

-- 

This .signature sanitized for your protection

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-17 Thread Mel
On Tuesday 16 December 2008 16:16:27 Andrew Gould wrote:
 On Tue, Dec 16, 2008 at 9:03 AM, Dr. Jennifer Nussbaum

 bg271...@yahoo.comwrote:
  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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-17 Thread Peter Schuller
 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.schul...@infidyne.com'
Key retrieval: Send an E-Mail to getpgp...@scode.org
E-Mail: peter.schul...@infidyne.com Web: http://www.scode.org



pgpLyIgs9Hyg3.pgp
Description: PGP signature


Re: Copying system/ports configuration?

2008-12-17 Thread Andrew Gould
On Wed, Dec 17, 2008 at 2:00 AM, Mel fbsd.questi...@rachie.is-a-geek.netwrote:

 On Tuesday 16 December 2008 16:16:27 Andrew Gould wrote:
  On Tue, Dec 16, 2008 at 9:03 AM, Dr. Jennifer Nussbaum
 
  bg271...@yahoo.comwrote:
   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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-16 Thread Andrew Gould
On Tue, Dec 16, 2008 at 9:03 AM, Dr. Jennifer Nussbaum
bg271...@yahoo.comwrote:

 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.

Check out 'man pkg_create'.  Hopefully someone will post a more complete
answer.

Good luck,

Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-16 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dr. Jennifer Nussbaum 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
 

Hi Jen,

I am assuming that you are using VMware, but if that's not the case,
please respond to the thread.

VMware Converter (http://www.vmware.com/products/converter/) is
typically used to convert a physical machine to a VM, but I'm not sure
that it will work with FreeBSD.

If it doesn't, then I think you need to use a tool like Norton Ghost,
Acronis TrueImage or Partimage (http://www.partimage.org/Main_Page) to
create a disk image of your production machine.

Once you do that, create your VM, boot with the rescue image of the tool
that you chose and use it to restore the production machine disk image
into your VM.  Reboot and you should have a VM that only requires some
minimal reconfiguration.

Hope that helps,
Greg Larkin

http://www.FreeBSD.org/
http://www.sourcehosting.net/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklH2jMACgkQ0sRouByUApAbUwCfZaX7Pm9jJjxKmOHZhE5DQcpB
6S8AoLSuy35SuUu3XfxFsUd7OJIYWiYi
=2kfG
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-16 Thread Wojciech Puchar

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?


simply copy everything
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Copying system/ports configuration?

2008-12-16 Thread Dr. Jennifer Nussbaum
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


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-16 Thread Dr. Jennifer Nussbaum

--- On Tue, 12/16/08, Greg Larkin glar...@freebsd.org wrote:

 From: Greg Larkin glar...@freebsd.org
 Subject: Re: Copying system/ports configuration?
 To: bg271...@yahoo.com
 Cc: freebsd-questions@freebsd.org
 Date: Tuesday, December 16, 2008, 8:41 AM
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Dr. Jennifer Nussbaum 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
  
 
 Hi Jen,
 
 I am assuming that you are using VMware, but if that's
 not the case,
 please respond to the thread.

No, im using VirtualBox. I had tried VMware but foundit much harder to use.

I dont quickly see a free tool to do this. Maybe its easier to do this from 
scratch

Jen


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Copying system/ports configuration?

2008-12-16 Thread Polytropon
On Tue, 16 Dec 2008 09:26:05 -0800 (PST), Dr. Jennifer Nussbaum 
bg271...@yahoo.com wrote:
 I dont quickly see a free tool to do this. Maybe its easier
 to do this from scratch

The handbook mentions a common method to transfer installed
systems partition-wise using dump and restore. Maybe this is
useful to you in order to avoid an installation from scratch.

And finaly, there's always dd. :-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Copying system/ports configuration?

2008-12-16 Thread Bernard Dugas
On Tue, 16 Dec 2008 09:26:05 -0800 (PST), Dr. Jennifer Nussbaum 
bg271828 at yahoo.com wrote:

 I dont quickly see a free tool to do this. Maybe its easier
 to do this from scratch

I just found last week ports-mngnt/portmaster that can help you to do 
that, and i have suggested portmaster author to add an -export option 
readable to built new ports on another computer.


May be an -export-packages option would be nice also ?

Best regards,
--
Bernard DUGAS Mobile +33 615 333 770
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org