Re: pkg sqlite database borked ( again ). How to restore?
Date: Mon, 29 Nov 2021 11:22:01 UTC
Dennis Clarke via freebsd-current <freebsd-current@FreeBSD.org> wrote: > europa# xz -dc /var/backups/pkg.sql.xz.3 > /var/db/pkg/local.sqlite.dump > > europa# > europa# pkg backup -r /var/db/pkg/local.sqlite.dump > Restoring database: > Restoring: 100% > pkg: sqlite error while executing backup step in file backup.c:98: not > an error The backup file consists of sql statements, the pkg backup -r I think requires a binary db file. I think you need to do this: pkg shell < /var/db/pkg/local.sqlite.dump Cheers, Jamie