cwRsync : send all output to a file
Aaron Morris
aaronwmorris at gmail.com
Tue Apr 25 21:47:56 GMT 2006
On 4/25/06, Hamish Robertson <hamish at iskmweboffice.com> wrote:
> Hello
>
> I have been using cwRsync on some Windows boxes, backing up to a Linux server.
> I have found some issues which files being open and not being copied etc, so I
> decided that I would log the output from the rsync command on the Windows
> clients so that I can look at them.
>
> On the Windows boxes, I put the rsync command in a batch file and run that
> automatically each evening.
>
> However, if I simply open DOS and do:
>
> call "/path/to/batch.bat" >> "/path/to/logfile.log"
>
> Then all I get in the logfile is the list of files transferred etc. That is,
> all of the information about what worked.
>
> In the DOS screen, I get left with the errors (eg Permission Denied, or "rysnc
> cannot contact the srever" etc). These are the items I really want in my log
> file.
>
> Can anyone tell me of a way to get all of the log information put into the log
> file?
>
> Thanks
> Hamish
You're only catching STDOUT with that command, you need to pipe STDERR
as well. The unix way of doing this is ">> logfile.txt 2>&1" which
may work under DOS/Win as well.
--
Aaron W Morris (decep) <aaronwmorris at gmail.com>
More information about the rsync
mailing list