The Code42 app uses the Spotlight service on Mac to monitor your computer for file changes. This article describes:
- The technical details about how Code42 app and Spotlight work together
- Recommended solutions for errors associated with Spotlight
How the Code42 app uses Spotlight
At a high-level, here's how the Code42 app coordinates with Spotlight to back up your new or changed files:
- The Code42 app starts to back up.
- The Code42 app requests a snapshot from Spotlight for all local drives.
- Spotlight creates a snapshot containing information on all new or changed files.
- Spotlight provides the Code42 app with details to access the new snapshot.
- The Code42 app backs up ALL files using the snapshot until it reaches a file that has changed since the snapshot was created or the backup session finishes.
This process repeats when Spotlight reports data in your file selection has changed.
Diagnose problems with Spotlight
The reason may be due to one of the following Spotlight-related problems:
Unable to back up files due to restricted permissions
The Code42 app cannot back up files or folders that have restricted permissions and display a red circle in the Finder. You can either prevent Code42 app from trying to back up the files by modifying your file selection, or you can perform the following steps to change permissions on the files to allow the Code42 app read/write access:
- In Finder, select the folder you want to update.
- Choose File > Get Info.
- Click the triangle next to Sharing & Permissions to expand the section.
- Click the lock icon to allow editing of your settings.
- When prompted, enter your password to allow changes to the Finder.
- Next to everyone, click No Access to display privilege options.
- Select Read & Write.
- Click the gear icon, then select Apply to enclosed items to apply the setting to enclosed subfolders and files.
Click OK when prompted to confirm the change.
- Click the lock icon again to prevent future changes.
Code42 app is unaware of file changes
Because the Code42 app uses Spotlight to detect file changes, the Code42 app real-time file watch feature cannot detect any new or changed files in your file selection if Spotlight does not report the changes to the files. Confirm that file watching is running and that Spotlight is reporting file changes:
- In your device backup settings, confirm that the box next to Watch file system in real-time is selected.
- Manually start the file verification process in the Code42 app by selecting Scan for file changes.
- If you notice that new files are not being detected and backed up by the Code42 app, it could be that Spotlight has not indexed the files. Re-index Spotlight by following the steps outlined in this Apple support article.