knowledgeC.db could not be backed up

My Time Machine backups keep failing.

I get the message

Time Machine couldn't complete the backup to "NAS server"

"/private/var/db/CoreDuet/Knowledge/knowledgeC.db" could not be backed up.

/private/var/db/CoreDuet/Knowledge/knowledgeC.db

The issue started a couple of days ago, but now it recurs regularly.

Rebooting does not help. Running First Aid in Disk Utility shows no problems.

The file in question seems to be used by Siri to track app usage, but disabling Siri does not help. It appears I am not alone in having this problem, but I haven't been able to find any solution. Is there one? Would deleting the Knowledge folder have any adverse effects?

I'm running macOS Monterey 12.1 on a MacBook Pro 2021 (M1).

The Knowledge folder seems remarkably inaccessible:

> sudo bash
# pwd
/private/var/db/CoreDuet
# ls
Knowledge       People
# ls -l
ls: Knowledge: Operation not permitted
total 0
drwxr-xr-x  7 root  wheel  224 Dec  2 07:07 People
# cd Knowledge
cd: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
# pwd
/private/var/db/CoreDuet/Knowledge
# ls
ls: .: Operation not permitted
# ls -l
ls: .: Operation not permitted
#

However, I can reproduce the same commands on a Mac mini 2020 (M1), so this interaction does seem to be standard behavior for this file and not due to corruption.

@cmason has a promising suggestion, but I am not able to exclude the folder, because it is, as usual, behaving strangely:

❯ tmutil isexcluded /private/var/db/CoreDuet
[Included]    /System/Volumes/Data/private/var/db/CoreDuet
❯ tmutil isexcluded /private/var/db/CoreDuet/Knowledge
tmutil: isexcluded requires Full Disk Access privileges.
To allow this operation, select Full Disk Access in the Privacy
tab of the Security & Privacy preference pane, and add Terminal
to the list of applications which are allowed Full Disk Access.
❯ tmutil addexclusion /private/var/db/CoreDuet/Knowledge
/private/var/db/CoreDuet/Knowledge: Error (-50) while attempting to change exclusion setting.

Note that the terminal that I am running these command in, most definitely has Full Disk Access.

Howerver, I did succeed in excluding the entire /private/var/db/CoreDuet/ folder. I'll wait and see if that fixes the issue.


Time Machine generally does not backup system logs or generally any temporal-based information. Generally, knowledgedc.db is a iOS SQLite db that effectively is a logfile on iOS. (I suspect this might be used on Monterey to support UIKit/iOS apps, but can not confirm). Therefore it is likely being excluded by Time Machine.

You can confirm this on your machine by using the isexcluded command. Try tmutil isexcluded /private/var/db/CoreDuet/Knowledge

If it is, you can try to addexclusion. See the tmutil Man page.

Time Machine generally excludes:

  • System log files
  • Spotlight indexes
  • Cache files
  • Trash
  • Files excluded by applications