This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/kvrocks-website.git
The following commit(s) were added to refs/heads/main by this push:
new 6a0fd82 Add new doc: kvrocks2redis (#138)
6a0fd82 is described below
commit 6a0fd82f81fe4aabcbcfdbc4a584dc1855302e6b
Author: hulk <[email protected]>
AuthorDate: Wed Aug 9 10:46:41 2023 +0800
Add new doc: kvrocks2redis (#138)
---
docs/kvrocks2redis.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
sidebars.js | 1 +
2 files changed, 51 insertions(+)
diff --git a/docs/kvrocks2redis.md b/docs/kvrocks2redis.md
new file mode 100644
index 0000000..04b39e3
--- /dev/null
+++ b/docs/kvrocks2redis.md
@@ -0,0 +1,50 @@
+## kvrocks2redis
+
+kvrocks2redis is used to migrate the data from Kvrocks to Redis(as well as
Kvrocks itself). It will read and parse data from the local dir first and then
use the psync command to read the remain change streams from the target host.
+
+## How to build
+
+Please refer [Kvrocks#build](https://github.com/apache/kvrocks#build), this
step will build `kvrocks2redis` in the build dir as well.
+
+## How to run
+
+```shell
+./build/kvrocks2redis -c kvrocks2redis.conf
+```
+
+For the configurations in `kvrocks2redis.conf`
+
+```
+# The value should be INFO, WARNING, ERROR, FATAL
+log-level INFO
+
+# Determine whether to run on the deamonize mode or not
+# Default: no
+daemonize no
+
+# Where to read and parse the local DB, it should be same as the `dir` in
kvrocks.conf
+# Default: ./data
+data-dir ./data
+
+# Where to store the output like the sync sequence and AOF file
+#
+# Default: ./
+output-dir ./
+
+# The source host:port to sync change streams after parsing the local DB
+# kvrocks <kvrocks_ip> <kvrocks_port> [<kvrocks_auth>]
+kvrocks 127.0.0.1 6666
+
+# If the source Kvrocks enabled the cluster mode, should enable it here as
well.
+# Default: no
+cluster-enable no
+
+# Synchronize the specified namespace data to the specified Redis DB.
+# Warning: It will flush the target redis DB data first before syncing the
data.
+#
+# namespace.{namespace} <redis_ip> <redis_port> [<redis_auth>
<redis_db_number>]
+# Default redis_db_number is 0
+namespace.__namespace 127.0.0.1 6379
+```
+
+To be noticed, the `kvrocks2redis` must be deployed on the same machine as the
Kvrocks instance since it needs to read the data from the local DB dir.
diff --git a/sidebars.js b/sidebars.js
index f412afd..8c62300 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -15,6 +15,7 @@ const sidebars = {
items: [
'backup',
'kvrocks-exporter',
+ 'kvrocks2redis',
]
},
{