首页 > 其他分享 >cdc-file-transfer 使用说明

cdc-file-transfer 使用说明

时间:2023-01-10 17:24:09浏览次数:54  
标签:https cdc -- transfer file linux path com

cdc-file-transfer 主要是场景是windows 到linux 主机的数据同步,包含了stream 以及rsync 两大工具

使用注意事项

  • 首次执行会进行server copy,但是目前有点问题,如下,通过测试似乎和openssh 版本有关系,使用最新的没发现问题

 

 

  • linux server 支持问题

默认官方提供的软件包使用的glibc 那本有点高,所以低版本系统会有问题,解决方法是可以自己构建一个低版本的
信息如下:

 

 

  • vcruntime140_1.dll 问题
    可以下载相关的vcruntime140_1.dll 拷贝到windows/system32 目录下,我提供了一个在下边的链接中
  • windows 机器需要ssh 以及scp 工具,windows 的可以通过安装微软开源的(参考以下链接),但是注意测试(以前有碰到过类似的问题)
  • windows 主机到linux 机器需要免密登录,windows openssh 可能木有ssh-copy-id 可以通过拷贝公钥到linux 主机的~/.ssh/authorized_keys 文件中
  • 其他配置参数推荐通过%USERPROFILE%\.ssh\config 修改
    参考
 
Host linux_device
  HostName linux.device.com
  User user
  Port 12345
  IdentityFile C:\path\to\id_rsa
  UserKnownHostsFile C:\path\to\known_hosts
  • 基于环境变量的scp ssh 配置
set CDC_SSH_COMMAND="C:\path with space\to\ssh.exe"
set CDC_SCP_COMMAND="C:\path with space\to\scp.exe"
  • 同步模式,rsync 模式参考
cdc_rsync C:\path\to\assets\* [email protected]:~/assets -vr
  • stream 模式
    实际上是一个windows 服务,后台任务
 
启动
cdc_stream start C:\path\to\assets [email protected]:~/assets
停止
cdc_stream stop [email protected]:~/assets

自己源码编译的问题

  • ccache: error: Failed to create temporary file for /root/.ccache/tmp/main.stdout: Read-only file system
    添加--sandbox_writable_path=$HOME/.ccache 配置
 
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections --sandbox_debug --sandbox_writable_path=$HOME/.ccache  //cdc_rsync_server
  • gcc: error: unrecognized command line option '-std=c++17'
    可以基于centos 的devtoolset
 
yum install devtoolset-9-gcc-c++
scl enable devtoolset-9 bash

注意对于以前执行的可以通过bazel clean 以及bazel sync 处理下,不然可能会有错误

  • --gc-section: unknown option
    如果碰到可以删除-linkopt=-Wl,--gc-sections 试试
 
bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --sandbox_debug --sandbox_writable_path=$HOME/.ccache  //cdc_rsync_server

说明

以上是一个初步的整理,直接使用官方的因为centos 7 glibc 版本问题,通过自己构建的,对于cdc_rsync 测试是通过的,cdc_stream 暂时还没测试
构建支持centos 7 的版本已经发布到github 中了,大家可以使用

参考资料

https://github.com/google/cdc-file-transfer
https://github.com/rongfengliang/windows_dlls
https://github.com/PowerShell/Win32-OpenSSH
https://github.com/PowerShell/openssh-portable
https://www.cnblogs.com/rongfengliang/p/16644473.html
https://stackoverflow.com/questions/60336940/g-error-unrecognized-std-c17-what-is-g-version-and-how-to-install
https://github.com/bazelbuild/bazel/issues/12124
https://github.com/google/j2cl/issues/21
https://github.com/rongfengliang/cdc-file-transfer-centos7

标签:https,cdc,--,transfer,file,linux,path,com
From: https://www.cnblogs.com/rongfengliang/p/17040842.html

相关文章

  • jenkins执行Build Now报错系列(一)generated for lockfileVersion@2
    控制台报错如下: 主要是因为npm内的版本是lockfileVersion@1的,但是项目中用的是lockfileversion@2,因此需要升级npm,升级语句是npminstall-gnpm。我这边的npm是通过选......
  • Flashdevelop解决ANE报Not supported native extensions profile
    ​ 报 Not supported native extensions profile  解决办法: 修改application.xml文件原<​​​​supportedProfiles​​​​>desktopextende......
  • cdc-file-transfer 谷歌开源的windows 到linux 同步工具
    cdc-file-transfer是基于contentdefinedchunking以及fastcdc技术,cdc-file-transfer目前提供了两种工具cdc_rsync类似rsync的同步能力,进行文件拷贝,但是性能相比rsyn......
  • Makefile
    简单示例src=$(wildcard./*.c)objs=$(patsubst%.c,%.o,$(src))target=app$(target):$(objs)$(CC)$^-o$@%.o:%.c$(CC)-c$<[email protected]:clea......
  • confluence Couldn't lock file 'lock' in directory /var/atlassian/application-dat
    Couldn'tlockfile'lock'indirectory/var/atlassian/application-data/confluenceMakesurethedireconfluence因为服务器重启之后导致了这个问题。重启confluenc......
  • Seafile 搭建网盘
    初创建于:2022-10-0210:01seafile搭建网盘已经好长时间而,感觉需要一个同步网盘.之前用过iCloud,非常好用,现在的目标也是打造一个类似的增量同步网盘,最终选择......
  • 47-Docker-Dockerfile镜像创建自动化生产案例
    基于容器手动制作镜像步骤具体如下:下载一个系统的官方基础镜像,如:CentOS或Ubuntu基于基础镜像启动一个容器,并进入到容器在容器里面做配置操作安装基础命令配置运行环......
  • Dockerfile参考
    Fromopenjdk:8u252-jdkENVMEMORY_SIZE{{MEMORY_SIZE|default(1024)}}MENVPROJECT_NAME{{PROJECT_NAME}}ENVNAME{{NAME}}ENVJAVA_OPTS"-server-Xms$MEMORY_S......
  • Dockerfile 参考
    Dockerfile:FROMopenjdk:8u252-jdkENVJHIPSTER_SLEEP=0\JAVA_OPTS=""\LOGFILE=""\ACTIVE=""EXPOSE7777WORKDIR/data/appADDentrypoint.shentrypoin......
  • dart use DLL file
    Weneedtodotwostepsdefinetwotypesonefordartitselfandoneforffi,withffiasthebridgetypedefChangeBackgroundFFI=ffi.VoidFunction(ffi.Poin......