From owner-freebsd-stable@FreeBSD.ORG Wed Sep 4 20:07:19 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 30135EBF for ; Wed, 4 Sep 2013 20:07:19 +0000 (UTC) (envelope-from mauzo@anubis.morrow.me.uk) Received: from isis.morrow.me.uk (isis.morrow.me.uk [204.109.63.142]) by mx1.freebsd.org (Postfix) with ESMTP id 0BEBC21B8 for ; Wed, 4 Sep 2013 20:07:18 +0000 (UTC) Received: from anubis.morrow.me.uk (host86-182-11-25.range86-182.btcentralplus.com [86.182.11.25]) (Authenticated sender: mauzo) by isis.morrow.me.uk (Postfix) with ESMTPSA id 1C87C450B6 for ; Wed, 4 Sep 2013 20:01:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 isis.morrow.me.uk 1C87C450B6 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=morrow.me.uk; s=dkim201101; t=1378324891; bh=tMOaQ/AQDtXt76wmbdB/5fwPtPxUnj+BKbOVbfnVSTo=; h=Date:From:To:Subject:References:In-Reply-To; b=IBG0+bhxPXZkwlO20nDwI+wNjS7AIwJdQwWbGvbWBJRZCzWj9Sume3xtcfypYKZ4U VjqJ8KRn2BecDEPfd2+4s+rWdjM8VX9GQjTHqmUfDZLGvj3tIqHQ6D90aP0v3nYmm0 BJEnQR3/DPP+nzNuLsD9eU4w5sAqJjBklJ+qm3gI= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.8 at isis.morrow.me.uk Received: by anubis.morrow.me.uk (Postfix, from userid 5001) id BA42AD2CA; Wed, 4 Sep 2013 21:01:28 +0100 (BST) Date: Wed, 4 Sep 2013 21:01:28 +0100 From: Ben Morrow To: freebsd-stable@freebsd.org Subject: Re: Package database Message-ID: <20130904200124.GA1914@anubis.morrow.me.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Newsgroups: gmane.os.freebsd.stable User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 20:07:19 -0000 Quoth Freddie Cash : > On Wed, Sep 4, 2013 at 10:41 AM, Jim Ballantine wrote: > > > My /var/db/pkg has become corrupt, and I can't find an archive of it to > > install in it's place. Does one exist and if so where? If not any ideas > > on > > how to rebuild the db? > > Are you using PKGng or the old pkg_* tools? > > Meaning, is your data stored as individual files under > /var/db/pkg/PORTNAME/*, or as a single sqlite database under /var/db/pkg? > > If using PKGng, there's a backup copy under /var/db/backup* > > If using the older pkg_* tools, you're screwed. :) With either package system /etc/periodic/daily/220.backup-pkgdb backs up the whole of /var/db/pkg into /var/backups/pkgdb.bak.tbz*. With pkgng /usr/local/etc/periodic/daily/411.pkg-backup also backs up the pkgng db into /var/backups/pkgng.db; probably this means 220.backup-pkgdb should be turned off, but this doesn't happen by default. Ben