8

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?
Ayejay
  • 83
  • 3

1 Answers1

2
  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

Markus Junginger
  • 6,950
  • 31
  • 52
  • Thanks for the response. I played around it with it while waiting for the response (which by he way pretty quick, thanks), and figured it out. Best. – Ayejay Sep 10 '17 at 17:55
  • What is lock.mdf file? What is it's purpose? Why is it generated other than data.mdb file? – rohegde7 Jan 27 '20 at 12:57
  • The lock.mdb file keeps track of internal stuff, e.g. coordinating "reader" resources. It does not contain application data. – Markus Junginger Jan 29 '20 at 14:41