Le 29 mars 2010 à 17:43, Jens Miltner a écrit : Am 29.03.2010 um 17:39 schrieb Jean-Daniel Dupas:
Le 29 mars 2010 à 17:08, Jens Miltner a écrit :
Am 29.03.2010 um 16:55 schrieb Ken Thomases:
On Mar 29, 2010, at 9:20 AM, Jens Miltner wrote:
is there a supported way of automatically adding them (e.g. using a shell script) to the list of excluded or skipped folders? I assume I can change the Time Machine prefs file, but I'd just like to check whether there is a supported mechanism of adding exclude/skip folders?
First, changing the Time Machine preferences file is a really bad idea.
That's why I asked :)
Second, is there a reason you can't add the folder to the Time Machine exclusions manually?
Yes, I could, but the reason we have the custom shared prec. headers redirection is that we frequently need to grab historic versions and build them, so it's easy to forget adding a folder that I'm working on for a few days, which will clutter my backup unnecessarily...
Lastly, if you want to automate this, you can use the CSBackupSetItemExcluded() function. To do this from a shell script, you'd have to write a command-line tool around that API.
Great, that was what I was looking for... guess I should have found this myself while searching the documentation :-[
You don't need to do that. Xcode already excludes all temporary build files (precompiled headers, objects, etc.)
Are you sure this also holds true for custom shared precompiled header directories? My experience has been that it doesn't add those to the exclude list automatically (although I think it should).
I though it does (as I'm using a custom path too), but it appears I never encounter the issue only because my custom path is inside the project build dir, and the later is exclude from backup. You can check by listing extended attributes on the directory (xattr -l directory). If the folder or one of its parent contains a com.apple.XcodeGenerated attribute, it should be excluded (this is an undocumented attribute, and I may be wrong about this one though).
|