Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2010 13:17:58 +0200
From:      Ruben de Groot <mail25@bzerk.org>
To:        Doug Barton <dougb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, "Aryeh M. Friedman" <aryeh.friedman@gmail.com>
Subject:   Re: regenerating /var/db/pkg
Message-ID:  <20100422111758.GA39338@ei.bzerk.org>
In-Reply-To: <4BCFE209.20501@FreeBSD.org>
References:  <4BCE5ECC.6070202@gmail.com> <4BCFE209.20501@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 21, 2010 at 10:43:37PM -0700, Doug Barton typed:
> On 4/20/2010 7:11 PM, Aryeh M. Friedman wrote:
> > I acciddentally rm'ed my /var/db/pkg and want to know is it possible to 
> > rgenerate it (I have portmaster and portupgrade installed)
> 
> Portmaster certainly can't do this, it uses the information from
> /var/db/pkg. I'm not sure if portupgrade can do it or not.
> 
> Your most likely course of success is to generate a list of ports that
> you know you're using ("root" and "leaf" ports in portmaster
> terminology), back up any config or other key files from /usr/local,
> then delete everything and reinstall.

This question (how to restore /var/db/pkg) comes up fairly regularly. How 
about adding a /etc/periodic/daily/220.backup-pkgdb script or something?

Just asking opinions, if people want this, I'll make a patch and
file a PR.

Ruben




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100422111758.GA39338>