Your comments

As Bob said, the database is H2. But there is no plan for an automatic database content migration.

More specifically, the last Ubooquity 2 version uses H2 1.4.193 while Ubooquity 3 currently uses H2 2.2.222.
Any JDBC compatible client will be able to open a Ubooquity database (use "H2 embedded" mode). I personally like to use DBeaver.

If your goal is to migrate the bookmark table, you don't necessarily need to migrate everything.

You might try something like :

  • import all your files in Ubooquity 3
  • create a mapping between the v3 document id and the v2 document id + type (as there are 2 different tables in v2: books and comics, whereas there is only 1 in v3)
  • then you can copy the bookmarks from the old table to the new, applying some conversion function in the process, as the lastupdate field was renamed to updateDate, and the boolean isFinished was replaced by an enumeration with the following values :
    • UNREAD (which you don't need, as the bookmark does not exists in this case)
    • IN_PROGRESS
    • FINISHED

This is just from the top of my head, there might be a better way.

(e.g: once you have the mapping, you might use the bookmark REST API to insert bookmarks, the advantage being that when using the API you don't need to provide the reading status, is is automatically computed by the server)

Let me know if you need any more info.

Should be quite easy to add as a "hidden" feature (you'll have to tinker with the configuration file, it's faster if I don't have to modify the UI for this).

V3 uses a much more recent version of H2 than Ubooquity V2.

So changes in behaviour and reliability are possible, although I would have expected improvements instead of a decline in reliabilty.

In any case, abrupt shutdown can corrupt just about any file, I lost a Windows installation this way once (probably some system file that didn't survive the crash).

Apart from pluging the PC to a UPS, the easiest solution is probably a backup. Either part of a global backup policy (a good thing to have anyway), or just by lauching Ubooquity with a script that would make a copy of the database file each time Ubooquity is launched.

This message comes directly from the database (H2) used inside Ubooquity. 

I didn't know such a tool existed, but I found the part of H2 documentation that explains how to use it:

https://www.h2database.com/html/advanced.html#using_recover_tool


I did not try it though.

Thanks a lot for the thorough analysis !

I'd prefer to find a way to save bookmark when the page is closed rather than using a timer. So I'll probably try to use pagehide and visibilitychange events in addition or instead of beforeunload.

I don't have any iOS device though, I'll need some help testing the workaround when it's developped. :)

Oh, that rating.

Nothing planned for that yet, but that's a good idea I'll write it down.

Then i upgrade java for the last version and now i have:
G:\Ubooquity 3>java -version
java version "1.8.0_411"

You have the latest version of Java 8.

You need at least Java 17 to run Ubooquity 3.

For Windows you can use this one (but other exists, any Java 17+ should be fine): 

https://adoptium.net/en-GB/temurin/releases/?os=windows&arch=x64

I have added a "user rating" column in the database in version 3 (just in case) so that one day user can rate their books, but I don't know if and when I'll implement this feature.