ObjectBox - Database Backup/Restore

1.4k views Asked by At

I have gone through the documentation and code for sample app, and figured out that files/objectbox/objectbox/data.mdb is the default file where all data is stored.

Assuming my understanding is correct, I have a couple of questions that I couldn't find documentation on:

  1. I want to have a backup/restore functionality in my Android app. Assuming I use native SQLite DB, I know I can upload the .sqlite file to cloud, and then download it on the same (or even a different) device to restore it. Can the same be done with data.mdb file?
  2. How about lock.mdb? Do I need to copy\upload it along with data.mdb?
1

There are 1 answers

3
Markus Junginger On BEST ANSWER
  1. Ensure that the file is not opened (e.g. by any BoxStore) to enforce a consistent state of the data.mdb file for backup.

  2. The lock.mdb file is not relevant for backups