I want to backup efficiently (incremental backup) a windows box via rsync on a linux box.
First install Cygwin on the windows box (don't forget to check rsync and ssh during installation) and check if rsync is installed on the linux box; if not, install it using APT (or the package manager of your distribution) and create a repository: add in /etc/rsyncd.cont a block like this (don't forget to adapt some parameters to reflect your configuration):
path = /home/backup/repository_name
uid = nobody
gid = nogroup
read only = no
use chroot = yes
list = yes
auth users = username
secrets file = /etc/rsyncd.secrets
Then - again on the linux machine - add username and password in the file /etc/rsyncd.secrets using this format:
On the windows box create a text file and put into that file only the password of the rsync repository in the linux box.
Put this line in a .bat file and schedule the nightly execution (control panel - scheduled tasks):
C:\path\of\rsync -a -v --delete --password-file=C:\path\to\password.txt /cygdrive/c/source_dir rsync://username@ip_address/repository_name
On some system you need to put the rsync (cygwin) directory in the PATH environment variabile (My Computer - Properties - Advanced - Environment Variables).