Backup Core does not provide access to exclusions done via System Preferences

Originator:adamnhjl
Number:rdar://10735405 Date Originated:21-Jan-2012 06:04 PM
Status:Duplicate/10531232 Resolved:
Product:Mac OS X Product Version:10.7.2/11C74
Classification:Enhancement Reproducible:Not Applicable
 
Summary: The Backup Core API (CSBackupSetItemExcluded() and CSBackupIsItemExcluded()) do not provide access to Time Machine path-based exclusion done via the Time Machine System Preferences pane. The System Preferences do not show files excluded using Backup Core. Additionally, there is no API to retrieve a list of all fixed-path exclusions.

Steps to Reproduce:

1. Exclude a file at path PATH_A via Time Machine options in System Preferences.

2. Query the state of PATH_A via Backup Core's CSBackupIsItemExcluded().

3. Exlude a file at path PATH_B via CSBackupSetItemExcluded() with excludeByPath == true.

4. Exlude a file at path PATH_B via CSBackupSetItemExcluded() with excludeByPath == false.

5. Look up if PATH_B is excluded in Time Machine options in System Preferences.

Expected Results: In step 2 CSBackupIsItemExcluded() should return YES and set *excludeByPath = YES as the exclusions done via System Preferences seem to be fixed-path. In step 5, PATH_B should appear among excluded files in System Preferences.

Actual Results: Exclusions via Backup Core do not affect exclusions via System Preferences and vice versa. Using either interface one cannot say certainly which files are really excluded. 

Regression: None.

Notes: What I have said about Backup Core applies to the tmutil command as well. Even if there is a reason to keep two separete databases of fixed-path exclusions, it would be more transparent to:

1. provide at least read-only access via an extension to the Backup Core API to the preference pane exclusions.

-- and perhaps also:

2. provide read-only access to programmatic (Backup Core) exclusions via Time Machine preferences and Finder info windows.

It would also be helpful to be able to retrieve a list of all fixed-path exclusions programmatically.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!