05-21-2015, 05:21 PM
I used to provide an option just to export the database file, and you wouldn't believe the number of emails I got from people who backed up their library using just a database backup (thinking they were backing up everything), even though I put a huge number of warnings in the description. I decided that it was too confusing for most users to provide both options, and now just have the "Expose Database" option for those that want to have direct access. If all you want is a database backup, you can just copy the .db file to a place of your choosing.
Thinking more about the .zip versus .msb issue, there is one issue I don't have an answer for yet. People like to restore their backups from the companion app, and when I do this, I stream the data across so that the tablet can extract the backup without needing adequate space to copy the file across. From what I've seen so far, I don't believe the Java zip classes will work with a stream of data - they all seem to want the file available locally. Another issue is speed - from what I've read so far, the Java zip libraries sound like they may be pretty slow. I'm going to have to do some measurements, but I wouldn't be surprised if my msb implementation is much faster to backup and restore. This only matters for large backup files of course, but I'm thinking it still makes sense to provide the option to choose one or the other.
itsme - I haven't forgotten about those requests, I just haven't had time to address them yet. As far as moving all of the settings to the database, I may consider this, but it would mean that every class in my code that wanted to persist settings would have to have access to the database. Using preference files is just much simpler. I have already researched how to back up all the data in these preference files, so I should be able to place these in the backup without any issues.
Mike
Thinking more about the .zip versus .msb issue, there is one issue I don't have an answer for yet. People like to restore their backups from the companion app, and when I do this, I stream the data across so that the tablet can extract the backup without needing adequate space to copy the file across. From what I've seen so far, I don't believe the Java zip classes will work with a stream of data - they all seem to want the file available locally. Another issue is speed - from what I've read so far, the Java zip libraries sound like they may be pretty slow. I'm going to have to do some measurements, but I wouldn't be surprised if my msb implementation is much faster to backup and restore. This only matters for large backup files of course, but I'm thinking it still makes sense to provide the option to choose one or the other.
itsme - I haven't forgotten about those requests, I just haven't had time to address them yet. As far as moving all of the settings to the database, I may consider this, but it would mean that every class in my code that wanted to persist settings would have to have access to the database. Using preference files is just much simpler. I have already researched how to back up all the data in these preference files, so I should be able to place these in the backup without any issues.
Mike