Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Where does Time Machine store its cache? Mine is sometimes corrupted.

Whenever a backup is run, Time Machine says "Preparing Backup...". During this stage, it looks for what files have been changed since the last backup by comparing changes in the Event Log (I assume) with its cache of files on the system.


Because of the cache, the Preparing stage is usually quite fast (30 seconds), but for some reason, sometimes when I restart from Boot Camp (Windows 7) into OS X, Time Machine's cache is wiped clean or corrupted. I know this because the Preparing stage takes 10 minutes after booting back into OS X.


So, that's why I'm wondering where the cache is located so perhaps I could determine why it's sometimes corrupted.

iMac, Mac OS X (10.7.4), 3.2 GHz Intel Core i3, 16 GB RAM

Posted on Jul 12, 2012 7:00 PM

Reply
Question marked as Best reply

Posted on Jul 13, 2012 6:50 PM

It's not a cache. Time Machine normally uses the File System Event Store, a hidden log that OSX keeps on each Mac-formatted disk or partition. That tells TM every folder that was changed; TM then compares the files in that folder to the most recent backup, to see what's changed and needs to be backed-up. Since OSX and apps consist of hundreds of thousands of folders that are rarely changed, it's a quick process.


Sometimes, however, it can't use the Event Log, and must compare every file on your system to the backups, so can take quite a while. Longer if your backups are on a network. This is called a "deep scan."


A number of things can cause that; a failed or cancelled backup; an abnormal shutdown; an abnormal shutdown or disconnection of the TM drive; a very large volume of changes that overwhelms the Event Log (entries aren't kept forever), such as an OSX update; and, sometimes, booting from another partition.


Bottom line: there's not much you can do to prevent it when booting back and forth between OSX and Windows when using Boot Camp.



See How Time Machine works its Magic for more details.

4 replies
Question marked as Best reply

Jul 13, 2012 6:50 PM in response to GaryKing

It's not a cache. Time Machine normally uses the File System Event Store, a hidden log that OSX keeps on each Mac-formatted disk or partition. That tells TM every folder that was changed; TM then compares the files in that folder to the most recent backup, to see what's changed and needs to be backed-up. Since OSX and apps consist of hundreds of thousands of folders that are rarely changed, it's a quick process.


Sometimes, however, it can't use the Event Log, and must compare every file on your system to the backups, so can take quite a while. Longer if your backups are on a network. This is called a "deep scan."


A number of things can cause that; a failed or cancelled backup; an abnormal shutdown; an abnormal shutdown or disconnection of the TM drive; a very large volume of changes that overwhelms the Event Log (entries aren't kept forever), such as an OSX update; and, sometimes, booting from another partition.


Bottom line: there's not much you can do to prevent it when booting back and forth between OSX and Windows when using Boot Camp.



See How Time Machine works its Magic for more details.

Oct 22, 2012 11:53 PM in response to Pondini

Okay thanks. I notice that it doesn't ALWAYS perform a deep scan when moving between OSes. However, because I have MacDrive installed in Windows 7, I am able to edit HFS+ partitions and so sometimes when I modify it, I assume that's when a deep scan is required. My last deep scan took only two minutes, so it isn't really a big deal anyway.

Oct 23, 2012 8:06 AM in response to GaryKing

GaryKing wrote:


Okay thanks. I notice that it doesn't ALWAYS perform a deep scan when moving between OSes. However, because I have MacDrive installed in Windows 7, I am able to edit HFS+ partitions and so sometimes when I modify it, I assume that's when a deep scan is required.


Yup, that'll do it. Apparently, MacDrive is modifying the files, but since it doesn't go through the OSX kernel, OSX isn't aware of it, so there aren't any entries in the File System Event Store. Fortunately, however, OSX does figure out that things were missed, and notifies Time Machine (and Spotlight, and any other processes using it).


It's rather dated, so may not apply exactly to Lion, but see this extract from the FSEvents design and implementation section of the Ars Technica review of Leopard:



As with all kernel-based file system notification mechanisms, including /dev/fsevents, there's still the possibility of file system changes occurring without going through the kernel. For example, a removable disk may be mounted on another non-Leopard computer and modified there. When it returns, the local kernel has no idea what's changed.


The FSEvents API includes callbacks for these situations, effectively telling the client, "Unknown changes have occurred. You'll have to do a full rescan yourself, then pick up on the new event stream going forward."

Where does Time Machine store its cache? Mine is sometimes corrupted.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.