Replies: 1 comment 4 replies
-
Thank you Lucien :-)
I recommend reading Caveats Using Read-only SQLite Databases from the App Bundle by @twocentstudios. It discusses GRDB/SQLite techniques for backing up a database in a way that makes sure it is fully contained in a single (uploadable) file. It may sound like it is too technical, but I'm not sure these are details you can skip. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to build a 'recover data' feature for when users get a new phone. I'm imagining this flow, but not wedded to it:
Optional step
User uses app, when DB updates it saves the DB (can update the diff or overwrite the old one - this db isn't going to get huge);
Research so far
I DO NOT need real time syncing/device handoff so I think I can discard most of this discussion: https://forums.swift.org/t/taking-grdb-beyond-local/75247
My schema has many foreign-key relationships so as per this discussion a very slick CloudKit sync seems off CloudKit synchronization options #1569.
The backup API seems a good starting point to get the copy and restore done locally: https://github.com/groue/GRDB.swift/blob/master/README.md#backup
What are some simple way/patterns to implement this? I am a hobbyist so my level is modest at best. If it helps to know where I'm storing my db here is
Persistence.swift
fileA really useful answer would have info on:
Even partial answers addressing some of these points would be valuable!
Lastly, if you read this Gwendal, thank you very much for the huge amount of effort you put into this library, its documentation and the help you give the community.
Beta Was this translation helpful? Give feedback.
All reactions