Backup using rsync

Dec 18, 2016
1 min read
Jun 30, 2023 16:33 EEST

The backup will copy files from windows to a NAS that has a share available via rsync.

Install Cygwin

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

Backup Script

I store my script in folder %userprofile%.

#!/bin/sh
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:

C:\cygwin64

If you now click the shortcut, it should open a window and directly start with the sync.


Related Posts