Method to replicate sqlite database across multiple servers

You can synchronize SQLite databases by embedding SymmetricDS in your application. It supports occasionally connected clients, so it will capture changes and sync them when a server comes online. It supports several different database platforms and can be used as a library or as a standalone service.


I used the Raft consensus protocol to replicate my SQLite database. You can find the system here:

https://github.com/rqlite/rqlite


Here are some options:

LiteReplica:

It supports master-slave replication for SQLite3 databases using a single master (writable node) and one or many replicas (read-only nodes).

If a device went offline and then it came online, the secondary/slave dbs are updated with the primary/master one incrementally.

LiteSync:

It implements multi-master replication so we can write to the db in any node, even when the device is off-line.

On both we open the database using a modified URI, like this:

  “file:/path/to/app.db?replica=master&bind=tcp://0.0.0.0:4444”

AergoLite:

Blockchain based, it has the highest level of security. Stores immutable relational data, secured by a distributed consensus with low resource usage.

Disclosure: I am the author of these solutions