commit 8a9c3cbe84515191b0a96b99285737ed8bcc2a24 Author: hans Date: Sun Feb 6 18:55:15 2022 +0800 first commit diff --git a/README.md b/README.md new file mode 100755 index 0000000..35bfb73 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +FsSync天软文件夹同步工具V1.0 + + 采用C-S架构,服务端监控NTFS文件系统USN文件记录表(与everything同样的技术), +能秒级侦测到指定文件夹文件变动。特别适用与有大量子文件夹、文件的应用场景(如几十万、甚至上千万个文件)。 +与传统文件夹扫描技术相比,完全没有文件夹扫描开销。 + +server: + 运行环境: windows + Microsoft Visual C++ Redistributable 2019 + 参考下载地址: https://download.visualstudio.microsoft.com/download/pr/9e04d214-5a9d-4515-9960-3d71398d98c3/1e1e62ab57bbb4bf5199e8ce88f040be/vc_redist.x64.exe + 配置文件: fs-svr.ini(支持多个目录),用户token信息存储在: .\user\taskname-userid文件中 +[TASK-1] +NAME=task-name-1 +PATH=d:\data\task-path-1 +EXCLUDE=log;log2 +timeout=10000 + +client(不依赖其它库环境): + windows环境: FSClient-win-x64-v1.0.exe + linux-arm64: fsclient-aarch64-v1.0 + linux-x64: fsclient-x64-v1.0 + +client使用说明: + fs-client.conf(josn串)配置文件: +{ + "ip":"xxxx:port", + "name":"path-name", + "taskcnt":16, + "zip":1, + "dsize":512000, + "path":"/data/mypath", + "uid":"user-id", + "token":"1234-7890-abcd-8901", + "del":true, + "log":true +} + + 可以使用命令行参数输入,或配置文件输入: + Usage of fsclient-x64-v1.0 + -L [-L] log to file. + -alsologtostderr + log to standard error as well as files + -c string + [-c] fs-client.conf Use the profile parameters if the profile exists. + -d string + [-d] The directory to store the downloaded file. + -h string + [-h] ip:port. + -log_backtrace_at value + when logging hits line file:N, emit a stack trace + -log_dir string + If non-empty, write log files in this directory + -logtostderr + log to standard error instead of files + -n string + [-n] SyncName. + -p int + [-p] capacity. (default 2048000) + -r [-r] delete no exists file. + -stderrthreshold value + logs at or above this threshold go to stderr + -t string + [-t] token. + -u string + [-u] uid. + -v value + log level for V logs + -vmodule value + comma-separated list of pattern=N settings for file-filtered logging + -x int + [-x] Download a file using N connections (default 1) + -z int + [-z] compress. (default 1) + +Demo: + fsclient-x64-v1.0 -c /data/mypath/fs-client.conf + fsclient-x64-v1.0 -alsologtostderr -d /data/mypath -h x.x.x.x:port -log_dir /data/mypath/.download~~~/log -n path-name -p 512000 -r -L -t 1234-7890-abcd-8901 -x 16 -z 1 \ No newline at end of file diff --git a/client/FSClient-win-x64-v1.0.exe b/client/FSClient-win-x64-v1.0.exe new file mode 100755 index 0000000..345cd3b Binary files /dev/null and b/client/FSClient-win-x64-v1.0.exe differ diff --git a/client/fs-client.conf b/client/fs-client.conf new file mode 100755 index 0000000..a266c84 --- /dev/null +++ b/client/fs-client.conf @@ -0,0 +1,12 @@ +{ + "ip":"xxxx:port", + "name":"path-name", + "taskcnt":16, + "zip":1, + "dsize":512000, + "path":"/data/mypath", + "uid":"user-id", + "token":"1234-7890-abcd-8901", + "del":true, + "log":true +} diff --git a/client/fsclient-aarch64-v1.0 b/client/fsclient-aarch64-v1.0 new file mode 100755 index 0000000..19150a9 Binary files /dev/null and b/client/fsclient-aarch64-v1.0 differ diff --git a/client/fsclient-x64-v1.0 b/client/fsclient-x64-v1.0 new file mode 100755 index 0000000..78f5eb4 Binary files /dev/null and b/client/fsclient-x64-v1.0 differ diff --git a/server/FS_Svr.exe b/server/FS_Svr.exe new file mode 100755 index 0000000..a1ec904 Binary files /dev/null and b/server/FS_Svr.exe differ diff --git a/server/TSNetApi64.dll b/server/TSNetApi64.dll new file mode 100755 index 0000000..942829f Binary files /dev/null and b/server/TSNetApi64.dll differ diff --git a/server/fs-svr.ini b/server/fs-svr.ini new file mode 100755 index 0000000..9d1281b --- /dev/null +++ b/server/fs-svr.ini @@ -0,0 +1,14 @@ +[DB] +PORT=333 + +[TASK-1] +NAME=task-name-1 +PATH=d:\data\task-path-1 +EXCLUDE=log;log2 +timeout=10000 + +[TASK-2] +NAME=task-name-2 +PATH=d:\data\task-path-2 +EXCLUDE=log;log2 +timeout=10000 \ No newline at end of file diff --git a/server/msvcp100.dll b/server/msvcp100.dll new file mode 100755 index 0000000..e9eae44 Binary files /dev/null and b/server/msvcp100.dll differ diff --git a/server/msvcr100.dll b/server/msvcr100.dll new file mode 100755 index 0000000..fd91c89 Binary files /dev/null and b/server/msvcr100.dll differ diff --git a/server/user/TASKNAME-UID b/server/user/TASKNAME-UID new file mode 100755 index 0000000..4e07526 --- /dev/null +++ b/server/user/TASKNAME-UID @@ -0,0 +1 @@ +123456-ABCDEF-000000-AAA999 \ No newline at end of file