Date: Fri, 04 Mar 2022 10:44:33 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 262337] ports-mgmt/pkg restore fails when created by periodic in /var/backups Message-ID: <bug-262337-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262337 Bug ID: 262337 Summary: ports-mgmt/pkg restore fails when created by periodic in /var/backups Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: rosenke@dssgmbh.de Flags: maintainer-feedback?(pkg@FreeBSD.org) Assignee: pkg@FreeBSD.org Running 12.3-Stable and pkg 1.17.5_1. When Restoring the pkg.sql from /var/backups (handled by /usr/local/etc/periodic/daily/411.pkg-backup) Restore fails. When backing up via pkg backup -d and restoring this there is no error. Tried this on 3 machines, same behaviour. =3D=3D=3D root@nbsdrosen (pts/8) /var/db/pkg 11(2) -> pkg -ddddd backup -r = pkg.sql=20 DBG(1)[5616]> pkg initialized DBG(4)[5616]> Pkgdb: running 'PRAGMA user_version;' DBG(4)[5616]> Pkgdb: executing 'PRAGMA foreign_keys =3D ON;' DBG(4)[5616]> Pkgdb: executing 'PRAGMA mmap_size=3D268435456;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO mtree(conte= nt) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR REPLACE INTO packages( origin, name, version, comment, desc, message, arch, maintainer, www, prefi= x, flatsize, automatic, licenselogic, mtree_id, time, manifestdigest, dep_form= ula, vital)VALUES( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, (SELE= CT id FROM mtree WHERE content =3D ?14), NOW(), ?15, ?16, ?17 )' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE deps SET origin=3D?1, vers= ion=3D?2 WHERE name=3D?3;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO deps (origin, name, version, package_id) VALUES (?1, ?2, ?3, ?4)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO files (path, sha256, package_id) VALUES (?1, ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR REPLACE INTO files (pat= h, sha256, package_id) VALUES (?1, ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO directories(path) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_directories(package_id, directory_id, try) VALUES (?1, (SELECT id FROM directories WHERE path =3D ?2), ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO categories(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_categories(package_id, category_id) VALUES (?1, (SELECT id FROM categor= ies WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO licenses(na= me) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_licenses(package_= id, license_id) VALUES (?1, (SELECT id FROM licenses WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO users(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_users(package_id, user_id) VALUES (?1, (SELECT id FROM users WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO groups(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_groups(package_id, group_id) VALUES (?1, (SELECT id FROM groups WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO script(scri= pt) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_script(script_id, package_id, type) VALUES ((SELECT script_id FROM script WHERE script =3D ?1= ), ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO option (opt= ion) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_option(package_id, option_id, value) VALUES (?1, (SELECT option_id FROM option WHERE option =3D ?2),?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO shlibs(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_shlibs_required(package_id, shlib_id) VALUES (?1, (SELECT id FROM shlibs WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_shlibs_provided(package_id, shlib_id) VALUES (?1, (SELECT id FROM shlibs WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO annotation(annotation) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR ROLLBACK INTO pkg_annotation(package_id, tag_id, value_id) VALUES (?1, (SELECT annotation= _id FROM annotation WHERE annotation =3D ?2), (SELECT annotation_id FROM annota= tion WHERE annotation =3D ?3))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_annotation(package_id, tag_id, value_id) VALUES ( (SELECT id FROM packa= ges WHERE name =3D ?1 ), (SELECT annotation_id FROM annotation WHERE annotation= =3D ?2), (SELECT annotation_id FROM annotation WHERE annotation =3D ?3))' DBG(4)[5616]> Pkgdb: preparing statement 'DELETE FROM pkg_annotation WHERE package_id IN (SELECT id FROM packages WHERE name =3D ?1) AND tag_id IN (SE= LECT annotation_id FROM annotation WHERE annotation =3D ?2)' DBG(4)[5616]> Pkgdb: preparing statement 'DELETE FROM annotation WHERE annotation_id NOT IN (SELECT tag_id FROM pkg_annotation) AND annotation_id = NOT IN (SELECT value_id FROM pkg_annotation)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_conflicts(package= _id, conflict_id) VALUES (?1, (SELECT id FROM packages WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_provides(package_= id, provide_id) VALUES (?1, (SELECT id FROM provides WHERE provide =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO provides(provide) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE packages SET manifestdiges= t=3D?1 WHERE id=3D?2;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO config_files(path, content, package_id) VALUES (?1, ?2, ?3);' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE config_files SET content= =3D?1 WHERE path=3D?2;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_requires(package_= id, require_id) VALUES (?1, (SELECT id FROM requires WHERE require =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO requires(require) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO lua_script(lua_script) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_lua_script(lua_script_id, package_id, type) VALUES ((SELECT lua_script_= id FROM lua_script WHERE lua_script =3D ?1), ?2, ?3)' Restoring database: Restoring: 100% pkg: sqlite error while executing backup step in file backup.c:98: not an e= rror pkg: sqlite error -- (null) Files created by pkg backup -d (pkg_backup.sql) and created by the periodic (pkg.sql) differ: -rw-r--r-- 1 root wheel - 78270464 4 M=C3=A4rz 11:42 pkg_backup.sql -rw-r--r-- 1 root wheel - 51963917 4 M=C3=A4rz 03:04 pkg.sql --=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-262337-7788>