https://tair-opensource.github.io/RedisShake/zh/guide/introduction.html 文档
https://github.com/tair-opensource/RedisShake/releases 下载地址
启动命令
./redis-shake shake.toml
查看运行内存
top -p $(pgrep -f redis-shake)
开机自启
方案一:通过 Systemd 配置(推荐)
1. 创建服务文件
sudo vim /etc/systemd/system/redis-shake.service
写入以下内容(根据实际路径调整):
Ini[Unit]
Description=Redis-Shake Data Synchronization
After=network.target redis.service
[Service]
Type=simple
User=root
WorkingDirectory=/www/redis-shake4.4.1
ExecStart=/www/redis-shake4.4.1/redis-shake /www/redis-shake4.4.1/shake.toml
Restart=always
RestartSec=10
StandardOutput=file:/www/redis-shake4.4.1/redis-shake.log
StandardError=file:/www/redis-shake4.4.1/redis-shake-error.log
[Install]
WantedBy=multi-user.target
2. 设置权限并启用
sudo chmod 644 /etc/systemd/system/redis-shake.service
重载配置sudo systemctl daemon-reload
设置开机自启
sudo systemctl enable redis-shake
取消开机自启
sudo systemctl disable redis-shake
重启服务
sudo systemctl start redis-shake
服务状态
sudo systemctl status redis-shake
停止运行
sudo systemctl stop redis-shake
sudo pkill -f redis-shake
pgrep -f redis-shake | xargs sudo kill -9
正文完