From owner-freebsd-questions Sat Jan 20 9:34:20 2001 Delivered-To: freebsd-questions@freebsd.org Received: from accord.grasslake.net (accord.grasslake.net [206.11.249.240]) by hub.freebsd.org (Postfix) with ESMTP id 23D3137B400 for ; Sat, 20 Jan 2001 09:34:01 -0800 (PST) Received: from marlowe (accord.grasslake.net [206.11.249.240]) by accord.grasslake.net (8.11.1/8.11.1) with SMTP id f0KHV8E57430 for ; Sat, 20 Jan 2001 11:31:09 -0600 (CST) (envelope-from swb@grasslake.net) Message-ID: <005b01c08307$5335d320$b8209fc0@marlowe> From: "Shawn Barnhart" To: Subject: Trashed /var, fixing /var/db/pkg Date: Sat, 20 Jan 2001 11:35:04 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Due to a bezel-power switch misalignment, my 4.2-STABLE /var partition got trashed. There wasn't a backup of it to restore from, but the data loss was minimal (/var/mail, mainly) . I recreated the directory tree per another 4.2-STABLE box and I think I've managed to squelch all the error messages about missing dirs. The one bit I'm most interested in fixing is /var/db/pkg, which contains a lot of tasty information about the ports I've installed. With this gone/broken, maintaining the ports I use seems kind of problematic. How can I rebuild this? I think I have a couple of options, and I'm curious which'd be the "right" way to do this: 1) Using /usr/ports/distfiles as a guide, copy the matching entries from another 4.2-STABLE box of near identical vintage. Some minor risk of variation, but both boxes were built within days of each other and I don't think the ports I've installed are terribly in terms of their rate of change. This ensures that I'm not actually overwriting any existing ports. 2) Using the distfiles as a guide, go through and remake and reinstall each port. This should rebuild /var/db/pkg entries with 100% accuracy, but I'm also worred that it will trash or overwrite existing config files. Which is the best option? (1) Seems the fastest although it has the slight risk that some port I've installed differs in file content or layout and may overwrite my existing config. (2) Seems the most accurate, although it'd be big drag to rebuild the ports right just to get my config files clobbered on reinstall. As a general rule do port builds respect existing config files, or do they just clobber them? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message