rsync使用案例分析

rsync使用案例分析

配置信息

复制代码
uid = nobody
gid = nobody
use chroot = no
read only = no
max connections = 200
transfer logging = yes
log file =/var/log/rsyncd.log
timeout = 900
 
[image]
path = /data/maotai
ignore erros
auth users = rsync
secrets file = /etc/rsyncd.secrets
hosts allow = *
list = false

rsync服务端创建密码文件

复制代码
echo "rsync:123456" > /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets

启动服务

复制代码
netstat -tulnp|grep 873
systemctl enable rsyncd
systemctl status rsyncd    
systemctl restart rsyncd    
systemctl status rsyncd

客户端安装rsync

省略

客户端创建密码文件

复制代码
echo "123456" > /root/passwd  
chmod 600 /root/passwd

测试案例

从客户端推送数据到服务端

复制代码
rsync -apvz --info=progress2 --password-file=/root/passwd /data/mysqlorgdata.tar.gz rsync@10.1.1.1::image
相关推荐
tntxia1 天前
linux curl命令详解_curl详解
linux
扛枪的书生1 天前
Linux 网络管理器用法速查
linux
SkyWalking中文站1 天前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
顺风尿一寸1 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
雪梨酱QAQ1 天前
Kubeneters HA Cluster部署
运维
江华森2 天前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森2 天前
Matplotlib 数据绘图基础入门
运维
XIAOHEZIcode2 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
江华森2 天前
NumPy 数值计算基础入门
运维
唐青枫2 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux