Operations 4 min read

How to Install and Configure rsync on Windows Server for Automated Backups

This guide walks through the required environment, Windows Server rsync installation, configuration of rsyncd.conf and password files, service startup, port verification, and client-side commands to achieve reliable, scheduled file synchronization between Windows machines.

Raymond Ops
Raymond Ops
Raymond Ops
How to Install and Configure rsync on Windows Server for Automated Backups

Environment

1. Sync target: test data

2. Server: Windows Server 2008 R2

3. Client: Windows 7 Ultimate 64‑bit

4. Server rsync version: cwRsyncServer_4.1.0_Installer.exe

5. Download links for rsync client and server: https://pan.baidu.com/s/1kHQSVEODxbtXpxxMnT1S2A (extraction code: 9q4m)

Server Installation Guide

Server Configuration

Directory Structure

Modify rsyncd.conf

use chroot = false
strict modes = false
uid = 0 # 0代表不限定用户
gid = 0
logfile = rsyncd.log
[testwin]
path = /cygdrive/d/u01/nc_backup/ # Windows backup directory needs /cygdrive prefix
ignoreerrors
readonly = false
transfer logging = yes
auth users = test_rsync # rsync virtual user
secrets file = etc/rsyncd.password # password file path
hostsallow = * # all hosts can access

Create password file

In the etc directory, create rsync.password with the content:

test_rsync:test4321

Start the service and verify the port

Client Synchronization

Run the following command 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 view

Client data after synchronization

Automate with a scheduled task

Configure a Windows scheduled task to run the rsync command periodically, achieving automatic backup to the target machine.

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.

OperationsWindows serverBackuprsync
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

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.