Operations 3 min read

How to Set Up rsync on Windows Server and Client for Automated File Sync

This guide walks through preparing a Windows Server 2008 R2 environment, installing cwRsync, configuring rsyncd.conf, creating password files, starting the service, verifying ports, and using rsync.exe on a Windows 7 client to automate backup synchronization via scheduled tasks.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Set Up rsync on Windows Server and Client for Automated File Sync

Environment: test data, server Windows Server 2008 R2, client Windows 7 64‑bit, rsync server cwRsyncServer 4.1.0.

Server installation

Server configuration

Modify rsyncd.conf

use chroot = false
strict modes = false
uid = 0 # 0 means no user restriction
gid = 0
log file = rsyncd.log
[testwin]
path = /cygdrive/d/u01/nc_backup/ # Windows backup path needs /cygdrive prefix
ignore errors
read only = false
transfer logging = yes
auth users = test_rsync # rsync virtual user
secrets file = etc/rsyncd.password # password file path
hosts allow = * # all hosts can access

Create the password file rsync.password in the etc directory with the content test_rsync:test4321.

Start the rsync service and verify the listening port:

Client synchronization

Run the following command on the Windows 7 client (ensure it is executed from the client’s bin directory or add it to the PATH):

rsync.exe -avz --password-file=rsync.password [email protected]::testwin /cygdrive/f/testwin_rsyncdir

Server data before sync:

Client data after sync:

Adding a scheduled task automates the backup process.

Original article link: https://www.cnblogs.com/zhangweiyi/p/10571273.html (copyright belongs to the original author).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

automationrsyncfile-sync
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.