Cygwin rsync backgroud job

0

We are moving windows server from a very old version (2008) to a new one. We are putting the storage on a nfs system that will be shared between several servers. All good and well - but the 2008 server doesn't work with the nfs (long story - there is no fix that won't crush the server).

I have created (with some help) a script :

:loop

C:\cygwin64\bin\killall rsync
C:\cygwin64\bin\rsync.exe -avdH --perms --partial-dir=/cygdrive/w/partial_rsync/ --delete --delete-during --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ 

goto loop

Now, there are some problems with it. It runs great, but if I log out or it runs for some time is stuck. It doesn't crashes or gives an error - it just goes to something that looks like a wait period. I run it from cmd - and if I just push enter on the command prompt it resumes. How can it be fixed?

Also, when I run if from windows scheduled tasks it looks like it doesn't run at all, it returns an empty run. Why?

matisa

Posted 2018-12-13T15:07:23.737

Reputation: 83

Why are you writing cycgwin commands in a cmd shell? You should be using a bash script for this. – DavidPostill – 2018-12-13T18:55:32.050

How are you running the commands in the windows scheduler ? – matzeri – 2018-12-14T10:38:43.990

No answers