From nobody Tue Jun 29 13:34:51 2021 X-Original-To: pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B44611D4A75 for ; Tue, 29 Jun 2021 13:34:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDlp32TKgz4rJ6 for ; Tue, 29 Jun 2021 13:34:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D83319EBF for ; Tue, 29 Jun 2021 13:34:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 15TDYpKR084147 for ; Tue, 29 Jun 2021 13:34:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 15TDYptR084146 for pkg@FreeBSD.org; Tue, 29 Jun 2021 13:34:51 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 256886] ports-mgmt/pkg pkg backup -r fails to restore local.sqlite Date: Tue, 29 Jun 2021 13:34:51 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N Bugzilla Automation has asked freebsd-pkg (Nobody) for maintainer-feedback: Bug 256886: ports-mgmt/pkg pkg backup -r fails to restore local.sqlite https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256886 --- Description --- When using "pkg backup" to create backup file from installed packages and l= ater trying to restore, it fails. Backup itself works. Restore part fails. root@fbsd:~ # uname -a FreeBSD fbsd 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021=09=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 root@fbsd:~ # pkg info libevent-2.1.12 API for executing callback functions on events or timeouts pkg-1.16.3 Package manager tmux-3.1c Terminal Multiplexer root@fbsd:~ # cp /var/db/pkg/local.sqlite /var/db/pkg/local.sqlite_bak=20 root@fbsd:~ # pkg backup -d pkg_backup.dump=20 Dumping database: Backing up: 100%=20=20=20 root@fbsd:~ # rm /var/db/pkg/local.sqlite root@fbsd:~ # cp pkg_backup.dump /var/db/pkg/local.sqlite=20 root@fbsd:~ # pkg info libevent-2.1.12 API for executing callback functions on events or timeouts pkg-1.16.3 Package manager tmux-3.1c Terminal Multiplexer So the backup file itself is OK. Now trying to use "restore": root@fbsd:~ # pkg backup -r pkg_backup.dump=20 Restoring database: Restoring: 100% root@fbsd:~ # pkg info pkg: sqlite error while executing ALTER TABLE packages ADD licenselogic INT= EGER NOT NULL DEFAULT(1); in file pkgdb.c:2489: no such table: packages root@fbsd:~ # ls -la /var/db/pkg total 32084 drwxr-xr-x 2 root wheel 7 Jun 29 16:08 . drwxr-xr-x 19 root wheel 27 May 8 14:50 .. -rw-r--r-- 1 root wheel 158 Jun 29 16:02 FreeBSD.meta -rw-r--r-- 1 root wheel 20480 Jun 29 16:08 local.sqlite -rw-r--r-- 1 root wheel 405504 Jun 29 16:08 local.sqlite_bak -rw-r--r-- 1 root wheel 0 Jun 29 16:08 pkg_backup.dump -rw-r--r-- 1 root wheel 50925568 Jun 29 07:39 repo-FreeBSD.sqlite