Search code examples
windowsfile-formatcouchbase-lite

View and/or edit a .cblite database from within Windows?


I have a .cblite (couchbase-lite) database which I would like to view on a Windows 8.1 machine. I currently see 3 approaches

  • On GitHub there seems to be a tool "CouchbaseLiteViewer" for doing just that under Mac OS, maybe it can be ported to Windows, but it looks to me like there are quite a few dependencies
  • Their "Mobile portal" repository seems to also contain the sources to roll my own tool from scratch in Java - same dependency issue
  • It might be possible to install Couchbase Server and import the .cblite database to access through the admin interface (Futon). I tried this with an older (1.x) Couchbase Server, but could not find how to import
  • If I understood the file format, I could maybe code something manually for my specific situation, but the file just looks like random/compressed data without any noticeable header

I am a bit lost how to continue here - can anyone give me some pointers of how to do this?


Solution

  • Is it .cblite or .cblite2? Couchbase Lite moved to the .cblite2 format in 1.2. If you have a .cblite file then it is simply an SQLite file with another extension and you can view it with any SQLite editor. .cblite2 is a directory with either db.sqlite3 or db.forest.X inside depending on the storage engine used. You can view the former with an SQLite editor, but the latter is a bit more complicated. If you want to write an editor, then the actual querying will not be hard (you can just use an all documents query). The bulk of the work will just be hooking up that information to display.