6

Sometimes, when Time Machine starts a new backup, I see that it'll be several GB of data. I then wonder: What did I save that was so large? Is it perhaps backing up unnecessary data, that I should exclude in the future?

As a Mac developer, I understand that there must be some kind of database that Time Machine maintains in order to know what files need to be backed up. I like to have access to that so that I can stop a large backup process and then check the database for the pending files, and decide whether I want to take further actions.

I am so far unable to find out where the information is stored.

I checked the tmutil tool, but that doesn't seem to offer an option for listing the pending files, either.

I understand that I can use tmutil compare after a backup to see what was backed up, but I like to instead see the pending files in the queue.

  • This assumes that TM (or macOS) actually keeps a list of pending files somewhere. If TM just rescans the disk for changes (like rsync does) during the "Calculating ...` phase there won't be a list. – nohillside Mar 10 '17 at 9:49
  • @patrix It's well known that TM does not perform a scan but instead uses the FSEvents service to learn of changes to the live file system. Only if you boot a different non-OSX system, e.g. Windows, and then modify the volume so that OSX can't monitor the changes live, it'll perform a rescan next time. But that's the exception. Also, if it would scan each time, it would be utterly slow. But TM knows instantly what had changed in the past 30 minutes. So, with FSEvents, it might just hold the information in memory, but it persists across boots, so I assume a database file of some kind. – Thomas Tempelmann Mar 10 '17 at 9:51
  • 1
    Ah, right. So the question basically is "Where does the FSEvents service keep the list of changed files?" – nohillside Mar 10 '17 at 9:53
  • Nope, not FSEvents. Apps, including the TM service, subscribe to FSEvents, and keep their own record. FSEvents does keep its records only as long until it has informed all subscribers. Also, as TM filters out some folders, the FSEvents list would not be accurate. TM must have its own records somewhere. – Thomas Tempelmann Mar 10 '17 at 9:57
  • Check out How can I tell what Time Machine is backing up? along with the other Time Machine FAQs. Pondini's website is most informative Time Machine resource I've found. – njboot Mar 10 '17 at 16:57

You must log in to answer this question.

Browse other questions tagged .