Windows伺服器之間rsync同步檔案

來源:互聯網
上載者:User

標籤:

兩台windows7機器

server:192.168.12.104

client:192.168.12.103

 

目的:將server上的E盤的目錄FYFR裡面的內容定時同步到client上的D盤下FYFR目錄下

(不設使用者密碼驗證,直接匿名串連同步)

配置步驟:

服務端server:192.168.12.104

安裝cwRsyncServer_4.1.0_Installer

進入安裝目錄C:\Program Files (x86)\ICW,開啟設定檔rsyncd.conf

內容配置為:

uid = 0

gid = 0

use chroot = false

strict modes = false

hosts allow = *

log file = rsyncd.log

 

# Module definitions

# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work

 

#定義被同步的目錄

[parker]

path = /cygdrive/E/FYFR

read only = false

transfer logging = yes

 

開啟服務services

方法:開始——>運行——>services

找到名字為RsyncServer的服務,點擊開啟

關閉防火牆,如必須開啟防火牆,需配置允許相應連接埠通過防火牆

 

用戶端client:192.168.12.103

安裝cwRsyncClient_4.1.0_Installer

開啟CMD,執行如下操作測試能否正常串連到服務端

telnet 192.168.12.104 22

telnet 192.168.12.104 873

如上測試成功,便可以同步檔案

cd C:\Program Files (x86)\cwRsync\bin

rsync -vzrtopg --progress --delete 192.168.12.104::parker /cygdrive/d/FYFR

 

可以將上面兩條命令寫進bat檔案搞成計劃任務定時執行

Windows伺服器之間rsync同步檔案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.