View Single Post

  #7 (permalink)  
Old 05-05-2008
Todd H.
 
Posts: n/a
Default Re: How to get log file for rsync operation? Does rsync also delete remote files?

goran@lycos.com (Goran Ivanic) writes:
> I am planning to use rsync for a daily backup to a remote backup server.
>
> When I read the rsync manual it does not become clear on how to write a log file for the rsync operation.
>
> I am missing options like:
>
> rsync ..... -logfile=\home\backup\rsync.log -logmode=append ......
>
> Did I miss these options?
>
> I want to write (append !!) to the log file:
>
> - Which files were transferred
> - When the rsync operation took place
> - How much bytes were transferred (total sum) in the rsync operation
>
> How can I get such a log file otherwise?


First, I'm not sure you cross posted to enough newsgroups.


You can redirect stderr and stdout to a logfile.

rsync blah blah 2>&1 >> mylogfile.txt

> BTW: Does rsync delete remote files (from previous rsync operations) if they are not existing
> any more on the source system ?


It can, if you specify the --delete option. See man rsync for more.

--
Todd H.
http://www.toddh.net/
Reply With Quote