🎉A Bitcask Distributed Key/Value store using Raft for consensus with a Redis compatible API written...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
$ go get github.com/prologic/bitraft $ bitraft
You can also use the Bitraft Docker Image:
$ docker pull prologic/bitraft $ docker run -d -p 4920:4920 prologic/bitraft
SET key value GET key DEL key [key ...] KEYS [WITHVALUES] FLUSHDB SHUTDOWN
To backup data:
RAFTSNAPSHOTThis will creates a new snapshot in the
data/snapshotsdirectory. Each snapshot contains two files,
state.bin. The state file is the database in a compressed format. The meta file is details about the state including the term, index, crc, and size.
Ideally you call
RAFTSNAPSHOTand then store the state.bin on some other server like S3.
To restore: - Create a new raft cluster - Download the state.bin snapshot - Pipe the commands using the
bitraft --parse-snapshot state.bin | redis-cli -h 10.0.1.5 -p 4920 --pipe
This will execute all of the
state.bincommands on the leader at
For information on the
redis-cli --pipecommand see Redis Mass Insert.
bitraft source code is available under the MIT License.