Redis SYNC命令

Redis SYNC命令教程

Redis 的 SYNC 命令用于复制功能(replication)的内部命令,用于同步主从服务器。

Redis SYNC命令详解

语法

192.168.98.70:6379> SYNC

返回值

不明确。

时间复杂度

不明确。

可用版本

>= 1.0.0

案例

SYNC同步服务器

使用 SYNC 命令同步服务器

127.0.0.1:6379> SYNC Entering replica output mode... (press Ctrl-C to quit) SYNC with master, discarding 175 bytes of bulk transfer... SYNC done. Logging commands from master. "PING" "PING" "PING" "PING" "PING

我们使用了 SYNC 命令同步了服务器。

Redis SYNC命令总结

Redis 的 SYNC 命令用于复制功能(replication)的内部命令,用于同步主从服务器。