We backup some folders to a remote host using rsync. The destination folder will use compression.
At first login to the remote server and allow ssh access as root (make sure, password authentication is disabled).
We need this to fully backup permissions:
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
service sshd restart
Now create a backup volume:
zfs create -o compression=zstd-10 -o mountpoint=/backup zroot/backup
The backup will copy files from windows to a NAS that has a share available via rsync.
Make sure you have cygwin installed with the package rsync.
For all further steps I expect that cygwin was installed in C:\cygwin64
Configure the NAS
I store my script in folder %userprofile%.
rsync -aP --delete /cygdrive/d/bilder rsync://idefix@nas/Bilder
Shortcut in Windows
To get the script easily executed we create a shortcut on our desktop.
Fill as target:
C:\Windows\System32\cmd.exe /c ""C:\cygwin64\bin\sh.exe" --login -i /cygdrive/c/Users/idefix/backup.sh"
Fill as path:
If you now click the shortcut, it should open a window and directly start with the sync.