Current solution and problem with it: I currently zip my user directory when creating a backup of my CoreData-generated SQLite database. However, this backs up the redundant indexes (which make searching faster) as well. (In my case, a lot of redundancy was introduced by moving to CoreData with several search indexes. The amount of data increased from about 3 MB to more than 10 MB.)
What I want: I would like to backup my CoreData-generated SQLite database in a storage-efficient way, i.e., without the redundant search indexes. When restoring the backup, these search indexes should be recreated. The whole process of backing up and restoring should be as simple as possible, i.e., without manually creating a clone of the data structure without search indexes.
What I've tried: I've read the many posts on Stackoverflow about backing up CoreData and also Apple's documentation. For example: migratePersistentStore. In addition, I've read documentation on SQLite, e.g., SQLite Online Backup API. However, I haven't found any option to create a backup without the search indexes and to restore this backup in a way that the search indexes are rebuilt.
My settings/options:
OS: iOS 8.2
Device: iPhone 6 Plus
Store options:
@{ NSMigratePersistentStoresAutomaticallyOption : @YES, NSInferMappingModelAutomaticallyOption : @YES, NSSQLitePragmasOption : @{@"journal_mode" : @"DELETE"} };
MOC option: NSMainQueueConcurrencyType