Closed Clstroud closed 10 years ago
What files are getting "backed up" and where in your cloud container are they put? How are these files related to your Core Data store?
I haven't done any detailed investigation quite yet (hopefully tonight/tomorrow I can personally check… I have a homework assignment to finish first). However, this morning I woke up to an email that my iCloud storage was almost full. I found that strange so I checked Settings.app to find that all the aforementioned data was being backed up (edited for emphasis and NDA):
Now, as I mentioned, I haven't been testing anything with iCloud sync yet, so I've been effectively using USM as a means to manage my local store for the time-being. I don't know all that much about what it's doing by default in configuring that (other than it's been working just fine), but I do know from looking at the simulator's filesystem previously that these large data blobs are being stored in the same directory as the SQL db.
In most circumstances the SQL db would be quite small, even for apps storing lots of data. However, since I'm cramming sizable binary data blobs, it's piling up a considerable amount of data that would otherwise be negligible in the system backup.
Ideally, I think it makes sense for USM to store the SQL db (and thus Core Data's generated blob files) in its own directory and optionally set the no-backup flag on that containing folder. The idea here being that if the user wants that data backed up, they should turn on iCloud Sync.
Given that I haven't been testing iCloud sync yet, I can't comment on whether this data also gets backed up when using the ubiquity container, but I wouldn't think so.
Like I said, I can provide more detailed info once I'm finished with my homework assignment and can investigate further, but I believe that covers most of the details you requested.
I finally got a chance to investigate and believe I have a fix for this behavior mostly ready to go. Looks like it made a new issue over in #44 so I suppose we can continue to discuss there.
Forgive me if I've missed it anywhere in the documentation, but is there anything present for disabling backups for the persistent store? I'm using external storage and have ~200MB of data so far in testing, which is getting backed up to iCloud. I know it's a permissions flag that gets set on the files but since UBM is technically managing that data, it seems fitting that it should be capable of setting the "no backup" flags as necessary.
Thoughts? I can certainly work around it, it just seemed like something that would fit in USM :)
Note: I haven't started using iCloud sync yet, I'm just using USM locally for the time-being but will begin testing sync support very soon.