Note: This works all except for the shell script part. Need to figure that out. You can do it interactively just not from the command prompt.
- Install Git
- Install Git Bash via Git Tortoise install
- Added HOME=/c/Users/$USERNAME to C:\Program Files\Git\etc\profile
- See https://stackoverflow.com/questions/32232978/change-the-location-of-the-directory-in-a-windows-install-of-git-bash
- Download rsync.exe from https://repo.msys2.org/msys/x86_64/rsync-3.2.3-2-x86_64.pkg.tar.zst use 7-zip to decompress
- See https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows/
- Put rsync.exe into C:\Program Files\Git\usr\bin
- Open Git Bash and create a key file using ssh-keygen
- Create a shell script that copies the files
- Example test.sh
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
rsync -avz Pictures/ root@targetmachine:/data/pictures/
- Run the shell script from the command line
- "c:\Program Files\git\bin\sh.exe" -c "sh test.sh"
http://repo.msys2.org/msys/x86_64/rsync-3.1.2-2-x86_64.pkg.tar.xz - Link is invalid