I am glad to announce the new feature just added to litereplica:
Database replication by itself does not guarantee data loss protection. If a table is dropped in the primary replica, it will be dropped in the secondary ones too, leaving no way to restore the data.
With Point-in-time Recovery you can restore the database to a previous point in time, without the need to make backups and with almost no overhead on transactions.
It can be used so in the primary replica as in the slave ones. It can even be used locally without replication at all.
To activate PITR just add pitr=on in the URI filename:
The binary logs will be stored in a sub-folder named "binlogs". If you want to store them on a different location, use the pitr_path parameter:
The path is relative to the database path, and you can use an absolute path too.
If you want to limit the space used by the binary logs you can set the pitr_limit parameter.
To limit the total size to an absolute value use the M (for MegaBytes) or k (for KiloBytes) symbols:
To limit the total size to a value relative to the database file size use the x symbol:
And to limit the amount of log files use the p (points) symbol:
It is possible to use many options separated by commas, so the engine will use the lowest limit:
Feel free to ask questions in the general discussion forum, or via e-mail.