Date: Tue, 29 Jun 2021 13:34:51 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 256886] ports-mgmt/pkg pkg backup -r fails to restore local.sqlite Message-ID: <bug-256886-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256886 Bug ID: 256886 Summary: ports-mgmt/pkg pkg backup -r fails to restore local.sqlite Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: eimar.koort@tutamail.com Flags: maintainer-feedback?(pkg@FreeBSD.org) Assignee: pkg@FreeBSD.org 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=20=20=20=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 even= ts 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 even= ts 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 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256886-7788>