objectbox-dart
objectbox-dart copied to clipboard
data.mdb import and export
I noticed there is an implementation of this in java, can we have something like that in dart? https://github.com/objectbox/objectbox-java/issues/310
I agree this would be nice feature.
In the meantime, if it can help, I'm using this workaround:
- Navigate to the backup page in my app (something like pushuntil, but I'm using gorouter go actually). In this backup page, there are no Objectbox streams etc which could use the Store. There should be nothing in the pages stack using Store resources.
- then for import or restore I can safely close Store without any problems
- zip and send .mdb to backend
- or fetch zip from backend, unzip and overwrite .mdb
- finally open Store
- navigate back to main page is ok
I don't know if this is the right way to do this.., but this workaround is working fine for my usecase.
I'm kind of struggling with this part how to make it seem seamless for the user, how to sync in the background, and also whether to use GoogleDrive + ICloud(which I don't know how to integrate) or custom backend. Where do you store your .mdb file? on Amazon? What library do you use for zip and unzip?
@eli1stark I'm not using sync, nor commercial cloud. This is just for backup of app configuration. Config is exported to a standalone server (php). the server has a backup system. I'm using "archive" library for zip/unzip