Issue with rsync/cwrsync on windows

1

I'm having this batch script which i'm trying to make to backup stuff to my external drive.

For some reason, it works just fine when I run it as administrator but not when i run it as a regular user.

I want to run it as regular user because i can't open all external drive directories on my laptop for instance, they require Administrtor rights.

This is the script:

@ECHO OFF
SET ARGS=-rltShv --delete --chmod=ugo=rwX
SET EXCLUDES=--exclude-from="/cygdrive/d/Software/Portable/Rsync/excludes.txt"
SET LOG=--log-file="/cygdrive/d/Software/Portable/Rsync/rsync.log"
SET RSYNC=rsync %ARGS% %EXCLUDES% %LOG%

%RSYNC% "/cygdrive/d/Downloads/" "/cygdrive/h/Downloads/"
%RSYNC% "/cygdrive/d/Dropbox/" "/cygdrive/h/Dropbox/"
%RSYNC% "/cygdrive/d/Photos/" "/cygdrive/h/Photos/"
%RSYNC% "/cygdrive/d/Software/" "/cygdrive/h/Software/"
%RSYNC% "/cygdrive/d/Video/" "/cygdrive/h/Video/"
%RSYNC% "/cygdrive/f/" "/cygdrive/h/Music/"
%RSYNC% "/cygdrive/e/Torrents/Finished/" "/cygdrive/h/Torrents/"

Anyone could shed some light on why this is giving me a headache?

Thanks

dzhi

Posted 2014-12-29T17:35:45.087

Reputation: 117

3Any errors reported? And try using rsync's full path – Nifle – 2014-12-29T17:42:03.440

jesus christ it worked!!! I Thought adding rsync path in environment would be enough. IF you want add your comment as an answer and i'll accept it. Thanks a ton matey! – dzhi – 2014-12-29T19:51:39.963

Added comment as an answer – Nifle – 2014-12-29T19:53:59.393

Answers

0

Make sure that rsync is in the path for your non-admin account or use it's full path in your script.

Nifle

Posted 2014-12-29T17:35:45.087

Reputation: 31 337