muttley91
muttley91

Reputation: 12684

Mark as "Do Not Back up"

I have a somewhat large database shipping with my application that is ONLY readable (the user writes nothing to this database). I'm looking for a very simple way to make sure that this database is not backed up. Is there an easy way to mark the database file as "do not back this up"?

Upvotes: 0

Views: 62

Answers (1)

Scott Berrevoets
Scott Berrevoets

Reputation: 16946

Create an NSURL instance with your file, and then set the NSURLIsExcludedFromBackupKey resource value:

[url setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:NULL]; // Can use an NSError for error reporting of course

From QA 1719

Upvotes: 3

Related Questions