From owner-freebsd-ports@FreeBSD.ORG Wed Nov 19 00:17:44 2014 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB24F1DA; Wed, 19 Nov 2014 00:17:44 +0000 (UTC) Received: from udns.ultimatedns.net (unknown [IPv6:2602:d1:b4d6:e600:4261:86ff:fef6:aa2a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63D7BA0F; Wed, 19 Nov 2014 00:17:44 +0000 (UTC) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id sAJ0IXGd004569; Tue, 18 Nov 2014 16:18:33 -0800 (PST) (envelope-from bsd-lists@bsdforge.com) To: "FreeBSD ports" , "FreeBSD STABLE" From: "Chris H" Subject: How to recover local.sqlite (pkg(8) problem) Date: Tue, 18 Nov 2014 16:18:33 -0800 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: <61ee02eda8e8d3c86fadc175453ffb68@ultimatedns.net> Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 00:17:44 -0000 Greetings, During the building of a meta-port in the ports tree. My /var/db/pkg/local.sqlite database became corrupted. I spent some time, both with the pkg man pages, and with sqlite3 itself attempting to use one of the backups created by periodic(8). Located in /var/backups. But all to no avail. For the record, I used pkg backup -r /var/backup/pkg.sql.xz, as well as unpacking a copy of that file, and issuing the same. Moving (renaming) the corrupted database aside, prior to. I also issued sqlite3 local.sqlite followed by read pkg.sql and quit went w/o issue. But issuing pkg info emitted several error messages. Which appeared to be from sqlite3(8). This is on RELENG_9, w/source, and kernel world from about 1 week ago. I know that the backup is in good shape, as I had been using it w/o issue. Is this a bug? Thank you for all your time, and consideration. --Chris