7

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.

7
  • 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, 2017 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. Mar 10, 2017 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, 2017 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. Mar 10, 2017 at 9:57
  • 1
    Sadly, Pondini's website appears to be offline. Fortunately, The Wayback Machine still has copies: web.archive.org/web/20170726205123/http://pondini.org/TM/… Mar 29, 2020 at 9:09

1 Answer 1

-1

The way the backup works is that it does a large base image of EVERYTHING and then each new backup just backs up changes.

However - If you perform a touch command, or you move files or interact with them in anyway, this can cause it to flag as being a change, and it will back it up again.

2
  • The changes are not kept in any database or anything like that, backup software in general just looks for changes in the files themselves.
    – Pete
    Mar 29, 2020 at 5:57
  • You're never going to find that list or database is the out-take of all this.
    – Pete
    Mar 29, 2020 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .