From owner-freebsd-questions@FreeBSD.ORG Wed Jun 13 23:14:10 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A27A3106564A for ; Wed, 13 Jun 2012 23:14:10 +0000 (UTC) (envelope-from Dave.Robison@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6551E8FC08 for ; Wed, 13 Jun 2012 23:14:10 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa04.fnfis.com (8.14.4/8.14.4) with ESMTP id q5DNAhci022685 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 13 Jun 2012 18:14:04 -0500 Received: from lefty.vicor.com (10.14.152.58) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.2.283.3; Wed, 13 Jun 2012 18:12:32 -0500 Message-ID: <4FD91E5F.6040502@fisglobal.com> Date: Wed, 13 Jun 2012 16:12:31 -0700 From: "Robison, Dave" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20120209 Thunderbird/10.0 MIME-Version: 1.0 To: References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.14.152.58] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.260, 0.0.0000 definitions=2012-06-13_08:2012-06-13, 2012-06-13, 1970-01-01 signatures=0 Subject: Re: Lost /var/db/pkg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: david.robison@fisglobal.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 23:14:10 -0000 On 06/13/2012 16:10, Waitman Gobble wrote: > On Wed, Jun 13, 2012 at 2:26 PM, Eitan Adler wrote: > >> On 13 June 2012 12:17, jb wrote: >>> William Orr worrbase.com> writes: >>> >>>> Hello, >>>> >>>> I had a hard disk failure some time ago, and I ended up losing >>>> /var/db/pkg/ and everything under it (before you say I should've been >>>> backing it up, I know, I was actually doing an initial full when this >>>> happened). Is there a way I can restore it, or at least manually add >>>> entries I know for sure about? >>> forums.freebsd.org/showthread.php?t=6466 >>> "The application themselves are still installed and will keep >> functioning, you >>> just removed the records of their installation. When you later install >> newer >>> versions, you may have to use a force flag to overwrite files (the port >> thinks >>> it is uninstalled after all). The new port installations will get >> recorded in >>> /var/db/pkg again.' >>> >>> jb >> This will work if you need minimal downtime, but *will* come back to >> bite you some time down the line. >> >> >> -- >> Eitan Adler >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to " >> freebsd-questions-unsubscribe@freebsd.org" >> > you could cross reference the package .tbz files with what's on your > system. > > ie, tar -ztvf apache-2.2.22_5.tbz > shows you what's in /usr/local/bin, etc. Might even be able to focus on man > pages only to get an xref index. > > I believe the files for /var/db/pkg are in the tbz files. > if you didn't keep your system up to date it might be trouble matching > versions, but you could get the list and see what's what, or at least have > a good idea of what _was_ installed. > I haven't tried but you could stick the 'current' files for /var/db/pkg > from tbz, matching what's installed - regardless of the 'new' version and > actual version installed, then to a pkg_delete --force then pkg_add .tbz . > it might complain about missing files but will 'prolly function. > If you have like 700-1000+ packages it might be worth the trouble. > > A thought :) > > Waitman Gobble > San Jose California USA > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > locate /var/db/pkg Might show you what was there recently... ls /usr/ports/distfiles might also go a long way toward showing you what you once had installed. apologies if these were previously mentioned. -- Dave Robison Sales Solution Architect II FIS Banking Solutions 510/621-2089 (w) 530/518-5194 (c) 510/621-2020 (f) daver@vicor.com david.robison@fisglobal.com _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.