From owner-freebsd-questions@FreeBSD.ORG Mon Aug 21 18:30:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83CDA16A4DA for ; Mon, 21 Aug 2006 18:30:03 +0000 (UTC) (envelope-from spock@dwinner.net) Received: from outbound-mail-24.bluehost.com (outbound-mail-24.bluehost.com [70.103.189.19]) by mx1.FreeBSD.org (Postfix) with SMTP id 0BE1F43D46 for ; Mon, 21 Aug 2006 18:30:02 +0000 (GMT) (envelope-from spock@dwinner.net) Received: (qmail 18030 invoked by uid 0); 21 Aug 2006 18:29:58 -0000 Received: from unknown (HELO box122.bluehost.com) (67.106.44.122) by mailproxy2.bluehost.com with SMTP; 21 Aug 2006 18:29:58 -0000 Received: from [216.113.237.29] (helo=[10.10.6.20]) by box122.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52) id 1GFEX8-0000bU-7i; Mon, 21 Aug 2006 12:29:58 -0600 Message-ID: <44E9FBA2.1010107@dwinner.net> Date: Mon, 21 Aug 2006 14:29:54 -0400 From: DW User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {731:box122.bluehost.com:dwinnern:dwinner.net} {sentby:smtp auth 216.113.237.29 authed with dwinner@dwinner.net} Cc: "Arend P. van der Veen" Subject: pkg database backup and restore 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: Mon, 21 Aug 2006 18:30:03 -0000 Hello, Can anyone provide some practical insight into best methods of backing up and restoring package databases? Inside of /var/db there are 2 directories: /var/db/ports and /var/db/pkg /var/db/ports I pretty much understand; that seems to simply be the config options saved from when a port is installed. ok. /var/db/pkg contains: pkgdb.db and a subdirectory for every port installed. If part of a normal backup routine, we are regularly backing up /var/db/pkg, how can we best use that backup in a scenario in which a machine needs to be rebuilt from scratch, and we're trying to save time going through and doing a portinstall on everything we can remember that should be installed? (or alternatively taking a backup of the results from a periodic "pkg_info > installed_packages.txt" and painstakenly going through the list and reinstalling everything one-by-one). Essentially, we're just looking for a streamlined approach to restoring the installed ports when we need to rebuild a machine. Thanks, DW