当前位置:网站首页>Rsync realizes folder or data synchronization between Win systems
Rsync realizes folder or data synchronization between Win systems
2022-07-30 07:08:00 【victorkevin】
Rsync实现WinFolder or data synchronization between systems
安装文件:
链接:https://pan.baidu.com/s/1G6mzZ33AKNolIOUUM-cOYA
服务端:
cwRsyncServer_4.1.0_Installer.exe

创建windowsThe system user required to run the service

use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
# 0Represents unlimited users
uid = 0
gid = 0
# The path used by this software,如果是windowsThe file paths of the system all start with /cygdrive为前缀
[test]
path = /cygdrive/e/sync
read only = false
transfer logging = yes
# rsync的虚拟用户,This user is not the user entered during the installation above,is the user the client connected to
auth users = test_rsync
# rsync的密码文件路径,Take the installation directory as a relative path
secrets file = rsync.password在安装目录下创建rsync.password,This file is a list of accounts and passwords used by the client to connect,After the creation is complete, follow the steps below to verify the permissions

确保用户Administrator对rsync.password有访问权限,If not then give read permission,Fill in the permissions if there is no problem
就输入test_rsync:123456 To the left of the colon is the username,右边是密码,注意注意注意:The client also has this file but does not need the left,This issue will be mentioned later
The above is ready,to start the service RsyncServer服务

最后检查RsyncServer的所使用的873端口是否启动,In case of conflictrsync.confChange the port on

客户端
安装文件:cwRsync_4.1.0_Installer.exe和chown.exe
The directory structure after installation,把chown.exe拷贝到bin目录下

在bin目录下创建client.password(不一定放在bin目录,这里只是为了方便),The content only needs to correspond to the serverrsync.password中的密码123456
Required before running syncclient.password密码文件授权,Otherwise, the client program cannot access it,The way of authorization can be operated through the interface(Refer to the server),也可以在bin目录下运行
chmod.exe -c 600 /cygdrive/${path}/client.password
chown.exe administrator/cygdrive/${path}/client.password${path}Refers to the local path to the password file,如/cygdrive/c/client.password 指c盘下面的client.password
chown.execommand to change the owner of a file,Currently I amadministratorRun the client's command,So here it is foradministrator授权
At this point you can run client commands,注意:When the client executes it, it needs to be on the client sidebin目录下,There is another way to configure environment variables:
rsync.exe -avz --password-file=client.password [email protected]::test /cygdrive/f/testwin_rsyncdi命令中的test_rsyncin the corresponding serverrsync.password文件的用户
::testin the corresponding serverrsync.conf中的test配置
Finally on the system pathf/testwin_rsyncdiSee the synchronized data files,If you want to run this sync in the early hours of the morning,可以在windowsset on the task schedule.
边栏推荐
猜你喜欢

十二、Kotlin进阶学习:一、Lambda 表达式;二、高阶函数;

SQL Server安装教程

二十二、Kotlin进阶学习:简单学习RecyclerView实现列表展示;

Oracle数据库SQL优化详解

Mycat2.0搭建教程

SQL Server Installation Tutorial

21. Kotlin Advanced Learning: Implementing Simple Network Access Encapsulation

MySQL 数据类型及占用空间

SQL Server database generation and execution of SQL scripts

十五、Kotlin进阶学习:一、子类与子类型;二、协变;三、逆变;
随机推荐
正则表达式语法详解及实用实例
Generalized Focal Loss 论文阅读笔记
Detailed explanation of ClickHouse query statement
CNN经典模型发展进程
Usage of exists in sql
Use kotlin to extend plugins/dependencies to simplify code (after the latest version 4.0, this plugin has been deprecated, so please choose to learn, mainly to understand.)
树莓派OpenCV+OpenCV-contrib
卷积神经网络(CNN)之卷积操作、池化操作、激活函数
Servlet basic principles and application of common API methods
对于国内数据交换平台的分析
GraphQL (1) Basic introduction and application examples
Xcode 建立 UIKit 项目(Hello World)
Function 函数式接口及应用
【青岛站】SWAT模型高阶应用暨无资料地区建模、不确定分析与气候变化、土地利用对面源污染影响模型改进及案例分析研讨
MySQL - Multi-table query and case detailed explanation
Redis 客户端常见异常分析
为什么会出现梯度爆炸和梯度消失现象?怎么缓解这种现象的发生?
FastAPI Quick Start
[Getting C language from zero basis - navigation summary]
MySQL - 多表查询与案例详解