Windows下的加密同步

Windows下的rsync使用及加密过程

项目背景介绍:

客户须要在异地作一个备份环境,备份包括数据库和文件数据的备份,基础环境已经事先搭建好,并测试经过;git

工具主要用到的文件概览

Windows下的加密同步
其中rsync_client和rsyncd文件是提早打包好的,其中包含了相应的工具和一些bat脚本
Windows下的加密同步
openssh则是开源项目能够在官链中下载(https://github.com/PowerShell/Win32-OpenSSH/releasesgithub

配置和使用过程

一、分别上传rsyncd/rsync_client到服务端和客户端数据库

二、服务端上传openssh 并解压到/program file目录下ssh

三、加密(执行install-shd.bat安装)配置文件默认安装在C:\Programdataide

四、修改sshd配置文件端口启用8703,删除组配置文件(能够不修改,我的习惯)工具

五、客户端生成一对密钥,将公钥添加至服务端authorized_keys测试

六、启动服务端opensshui

七、客户端运行同步加密

八、建立.bat文件code

九、建立定时同步任务


rsync.bat

C:\rsync_client\bin\rsync.exe /cygdrive/d/ -aAH --numeric-ids --safe-links --partial --quiet --rsync-path=C:\rsyncd\bin\rsync.exe -e '"C:\rsync_client\bin\ssh.exe" -p 8703 -i C:\rsync_client\home\Administrator\.ssh\id_rsa -T -x  -o Compression=no -o StrictHostKeyChecking=no' user@host:/cygdrive/d/
相关文章
相关标签/搜索