While MarkM has a good point about DFS-R, if you want to still use rsync, then cwrsync is a great Windows version of rsync, which includes a client & server, and can also use encryption. I have used this package on Windows for years. It works great, but (in my experience) can sometimes have slower than expected file transfer times.
You can easily create a Windows rsync server using Cygwin with rsync package. All you have to do is install Cygwin and make sure you include rsync (listed under 'Net' category using setup-x86_64.exe installer). After Cygwin is installed on your server open a terminal window/session and do the following:
Create rsyncd.conf file on server
Inside rsyncd.conf add config info ex) auth users = myuser
secrets file = /home/myuser/rsyncd.secrets
hosts allow = 192.168.1.2,192.168.1.8
log file = /home/myuser/rsyncd.log
port = 8730
use chroot = yes
read only = yes
[Share1]
path = /cygdrive/e/pathtofolder
[Share2]
path = /cygdrive/f/pathtofolder
Modify config to meet your specific needs.
Create rsyncd.secrets file on server and add secrets inside file ex) myuser:mysecretpassword
Protect rsyncd.secrets file on server (also required to properly run rsync daemon) ex) chmod 600 ./rsyncd.secrets
Test/Run daemon via cli on server ex) rsync --daemon --config=/home/myuser/rsyncd.confg --no-detach
Test rsync server connection from a client machine with rsync installed aswell ex) rsync -rdt rsync://myuser@rsyncserver:8730 Command should list available shares.
Test rsync server auth from client machine (enter password when prompted) ex) rsync -rdt rsync://myuser@rsyncserver:8730/Share1
Password:mysecretpassword
Command should list all files in specified share.
Something I've also learned about using Cygwin with rsync on Windows is that you also want to change your fstab file (located usually in Windows directory C:\cygwin64\etc on server or client) to include the noacl option otherwise you can run into all kinds of weird file permission issues when syncing. ex)
# /etc/fstab
#
# This file is read once by the first process in a Cygwin process tree.
# To pick up changes, restart all Cygwin processes. For a description
# see https://cygwin.com/cygwin-ug-net/using.html#mount-table
# This is default anyway:
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
If any errors occur check server's rsyncd.log (as configured /home/myuser/rsyncd.log)
I have found a great tool Yintersync - Rsych for Windows to manage replicating multiple windows servers back to one. I replicate over 2tb daily from 10 servers over a 2mbit broadband connection using it.
The backuppc package has a link to a minimal rsyncd implementation. It is based on cygwin, and only provides the rsyncd daemon service. It is a 32 bit implementation, but runs well on Windows 7 64 bit.
Is there a reason that you want to use rsync? If I were you, I'd go with the native DFS-R functionality built into Windows.
While MarkM has a good point about DFS-R, if you want to still use rsync, then cwrsync is a great Windows version of rsync, which includes a client & server, and can also use encryption. I have used this package on Windows for years. It works great, but (in my experience) can sometimes have slower than expected file transfer times.
You can easily create a Windows rsync server using Cygwin with rsync package. All you have to do is install Cygwin and make sure you include rsync (listed under 'Net' category using setup-x86_64.exe installer). After Cygwin is installed on your server open a terminal window/session and do the following:
Create rsyncd.conf file on server
Inside rsyncd.conf add config info ex)
auth users = myuser secrets file = /home/myuser/rsyncd.secrets hosts allow = 192.168.1.2,192.168.1.8 log file = /home/myuser/rsyncd.log port = 8730 use chroot = yes read only = yes [Share1] path = /cygdrive/e/pathtofolder [Share2] path = /cygdrive/f/pathtofolder
Modify config to meet your specific needs.Create rsyncd.secrets file on server and add secrets inside file ex)
myuser:mysecretpassword
Protect rsyncd.secrets file on server (also required to properly run rsync daemon) ex)
chmod 600 ./rsyncd.secrets
Test/Run daemon via cli on server ex)
rsync --daemon --config=/home/myuser/rsyncd.confg --no-detach
Test rsync server connection from a client machine with rsync installed aswell ex)
rsync -rdt rsync://myuser@rsyncserver:8730
Command should list available shares.
Test rsync server auth from client machine (enter password when prompted) ex)
rsync -rdt rsync://myuser@rsyncserver:8730/Share1 Password:mysecretpassword
Command should list all files in specified share.Something I've also learned about using Cygwin with rsync on Windows is that you also want to change your fstab file (located usually in Windows directory C:\cygwin64\etc on server or client) to include the
noacl
option otherwise you can run into all kinds of weird file permission issues when syncing. ex)# /etc/fstab # # This file is read once by the first process in a Cygwin process tree. # To pick up changes, restart all Cygwin processes. For a description # see https://cygwin.com/cygwin-ug-net/using.html#mount-table # This is default anyway: none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
If any errors occur check server's rsyncd.log (as configured /home/myuser/rsyncd.log)
References:
I have found a great tool Yintersync - Rsych for Windows to manage replicating multiple windows servers back to one. I replicate over 2tb daily from 10 servers over a 2mbit broadband connection using it.
Use DeltaCopy - http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
The backuppc package has a link to a minimal rsyncd implementation. It is based on cygwin, and only provides the rsyncd daemon service. It is a 32 bit implementation, but runs well on Windows 7 64 bit.
There is also a link to another set of packages package that includes an sshd service as well.