rsync linux机器之间的同步
来源:互联网 发布:极限编程和瀑布模型 编辑:程序博客网 时间:2024/06/01 10:45
需求:将10.27.159.20的/opt/img 目录下的文件同步到 10.27.46.159的/var/img目录下
1,在两台机器上分别安装rsync,
2,在10.27.159.20机器上创建文件 /etc/rsyncd.secrets,文件内容为10.27.159.20的用户名:密码(例如:root:admin)
创建/etc/rsync.conf 文件内容:
motd file = /etc/rsyncd.motd
list = no
uid = root
gid = root
max connections = 2
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.loc
ignore errors
slp refresh = 300
[epg]
hosts allow = 172.168.10.70,172.168.10.38
path = /var/epguser/rsync/
auth users = root
read only = no
secrets file = /etc/rsyncd.secrets
3,在 10.27.46.159创建文件/etc/img_rsync.pass 文件内容为10.27.159.20的密码(例如:admin)
4,在 10.27.46.159上执行命令:
sync -aSvH root@10.27.159.20::img /arts/www/pages/sh/img/ --password-file=/etc/img_rsync.pass >> /var/log/img_rsync.log
就能将10.27.159.20上的文件同步到本机器的 /arts/www/pages/sh/img/ 目录下
阅读全文
1 0
- rsync linux机器之间的同步
- linux rsync 不同服务器之间的文件备份同步
- rsync文件同步工具,可实现Linux之间,Linux与Windows之间的文件同步
- LINUX服务器之间用Rsync同步数据
- 使用rsync服务器同步几台机器之间的build镜像
- linux多个机器间文件同步(sersync+rsync)
- linux rsync实现两个目录的同步
- linux rsync 文件同步
- linux rsync同步文件
- linux rsync同步备份
- Linux rsync 同步实践
- Linux同步工具:rsync
- 【Linux】rsync文件同步
- 使用rsync进行CentOS服务器之间的目录同步
- rsync同步的使用
- rsync同步的艺术
- rsync同步的艺术
- rsync同步的艺术
- 字符串的比较
- 欢迎使用CSDN-markdown编辑器
- JSTL表达式
- 极化码小结(2)
- ora-01033:oracle initialization or shutdown in progress
- rsync linux机器之间的同步
- oracle打印九九乘法表
- nginx学习随笔--tcp_nodelay
- react native学习笔记8——网络请求
- activemq 安装环境配置
- CTF之MISC杂项从入门到放弃
- 关于写博客
- SecureCRT配色推荐和永久设置
- 深度学习简介