Skip to content
Ozan Tezcan edited this page May 18, 2021 · 2 revisions

Backup is on, can't be turned off

Resql implements the Raft algorithm, Raft requires you to save the current state to the disk when your WAL log is full. This is called a snapshot. Snapshot is always on. You'll see resql.snapshot file under the configured directory. You can copy this file even when the server is running. Snapshot is a backup file.

A new snapshot is first written to resql.tmp.snapshot and then it's renamed to resql.snapshot atomically. So, it's safe to copy resql.snapshot file while the server is running.

To start from backup:

1- Stop the cluster.
2- Clear *.resql files under configured directory. e.g rm -rf *.resql
3- Copy backup snapshot file to the configured server directory.
4- Optionally, you can change a config in resql.conf if you want. e.g override nodes etc.
5- Start the server with -b option : ./resql -b

Clone this wiki locally