# FileSync **Repository Path**: gezzr/FileSync ## Basic Information - **Project Name**: FileSync - **Description**: 文件同步工具 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2021-11-03 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FileSync #### 介绍 文件同步工具,基于netty开发. 支持通过配置不同的同步策略,在多台机器间定时或一次性同步多个文件 #### 软件架构 一个注册服务节点 多个客户端节点,注册节点负责客户端节点的互相发现 服务间通过rpc服务进行互相调用 #### 安装教程 1. 下载工程 2. 分别打包client与server为可执行jar包 #### 使用说明 1. 启动注册服务 jar -jar fsServer.jar serverConfig.yml 2. 启动客户端服务 jar -jar fsClient.jar clientConfig.yml #### 配置说名 服务端配置 ``` serverConfig.yml SERVER: port: 8011 #服务端的唯一配置,监听的接口 ``` 客户端配置 ``` clientConfig.yml #server config SERVER: host: 127.0.0.1 #要连接的注册服务器 port: 8011 #本机配置 CLIENT: clientName: Client1 #本机连接密码 clientPassword: client1XYZ #本机通信端口 clientPort: 8888 #下载文件的临时文件路径 tempPath: d:\tmp\ #会尝试在所有目标机器上获取sourceFilePath路径下的文件,并放在本机的targetFilePath目录下 targetFiles: - sourceFilePath: D:\tmp\LGS_8.82.151_x64_Logitech.exe targetFilePath: D:\fcn_win.exe #是否创建同步任务,false的话,只会在启动后运行一次,true的话,每10分钟执行一次 #暂时不支持配置定时和指定调度间隔 sync: false #更新规则 # B:keep the file with bigger size # S: keep the file with smaller size # O: keep the file with older last modified date; # N: keep the file with newer last modified date; # [BS][ON]:means compare size first,then compare modified date # [ON][BS]:means compare modified date first,then compare size updateRule: BN #目标节点配置 TARGETS: - clientName: Client2 clientPassword: client2abc #max amount of active thread to transfer file MAX_ACTIVE: 5 ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request