Using runas breaks redirection of rsync output

2 posts / 0 new
Last post
itefix
Offline
Last seen: 3 days 11 hours ago
Joined: 01.05.2008 - 21:33
Using runas breaks redirection of rsync output

Hi Tev,
Hope you might have some ideas of how I might try to work-around this problem. A while ago you mentioned that it is possible to redirect the output of rsync by using 1>program_log.txt 2>error_log.txt

I have found this to be very useful to keep track of what rsync is doing.

I have a situation where I need to run rsync as a different user to access all files on the volume. When I use runas to change the credentials under which the rsync process will run, if I leave the re-direct statements in then the process won't launch. The error message reported is: "Couldn't Create Process (87) The parameter is incorrect"

If I remove the redirection statements then the process launches OK (but of course logs to the screen).

Thanks,
VW

itefix
Offline
Last seen: 3 days 11 hours ago
Joined: 01.05.2008 - 21:33
Re: Using runas breaks redirection of rsync output

I worked out a way around this. While I could not get runas to work when calling rsync directly (with the redirection). If you place the whole argument in a separate cmd file (or script) and use runas on that script then it works.
Cheers,
VW

Topic locked

Release announcements