For incremental real-time backups (copying only modified pages) you can use litereplica .
It implements unidirectional database replication with support for time recovery, therefore, if a record or table is accidentally deleted, we can restore db (or primary or replica) to some point before the problem.
The backup is updated after each transaction, so if a failure occurs on the host computer, you have an updated backup at a different endpoint.
On the main side, the application will open db using the modified URI, for example:
"file:/path/to/main.db?replica=master&slave=tcp://my.server.ip:1234"
And in the replica / backup you should have a running application to receive updates. This application will open a copy of db using a URI as follows:
"file:/path/to/copy.db?replica=slave&bind=tcp://0.0.0.0:1234"
To enable time recovery, we need to add some parameters to the URI file name, for example:
&pitr=on&pitr_limit=200M
It can be included either in main db, as in backup / replica.
And to enable encryption (database and communication), add something like:
&cipher=chacha20&key=your_key_here
Bernardo Ramos Oct 10 '16 at 1:59 2016-10-10 01:59
source share