From owner-freebsd-questions@FreeBSD.ORG Fri Feb 12 03:31:02 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94DD0106566B for ; Fri, 12 Feb 2010 03:31:02 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF728FC16 for ; Fri, 12 Feb 2010 03:31:01 +0000 (UTC) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 16FA2EB4830; Fri, 12 Feb 2010 05:31:01 +0200 (EET) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id F0C6F160CD3; Fri, 12 Feb 2010 05:31:00 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2iJklGS8kxA6; Fri, 12 Feb 2010 05:31:00 +0200 (EET) Received: from kobe.laptop (ppp-94-64-227-136.home.otenet.gr [94.64.227.136]) by mail.ceid.upatras.gr (Postfix) with ESMTP id AE231160CB9; Fri, 12 Feb 2010 05:31:00 +0200 (EET) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o1C3V0Z3030796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Feb 2010 05:31:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o1C3Uxlp030786; Fri, 12 Feb 2010 05:30:59 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Adam Vande More References: <6201873e1002110815l312da12fr5388956f32465516@mail.gmail.com> <87d40btvqp.fsf@kobe.laptop> <6201873e1002111835p7836d8e0xd35c7765c6069f1@mail.gmail.com> Date: Fri, 12 Feb 2010 05:30:59 +0200 In-Reply-To: <6201873e1002111835p7836d8e0xd35c7765c6069f1@mail.gmail.com> (Adam Vande More's message of "Thu, 11 Feb 2010 20:35:16 -0600") Message-ID: <873a175dvw.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: python script to backup installed packages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 03:31:02 -0000 On Thu, 11 Feb 2010 20:35:16 -0600, Adam Vande More wrote: > Thanks for the tips, I may add some of your functionality to my own. > I think I might add a couple more features like accepting a backup > path from the command line and an auto create for the dir if it > doesn't exist. One other thing that might be useful is for it to > automatically create an install script for the backed up packages > which takes into account dependencies. Almost have a package > management system like some other unnamed OS's then. ;) This is bordering on creeping featuritis, so I would probably avoid going there. If you *have* a backup of the packages, you can start by installing portupgrade. Then you can point portupgrade at the package archive and use the -PP option to install all the dependencies. Then you can avoid all that and just use something like: cd /mnt/backup/packages/All pkg_add vim-lite\*tbz This will automatically install any packages vim-lite needs, as long as they are available in the current working directory.