In comp.os.linux.misc Goran Ivanic <(E-Mail Removed)> wrote:
> 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?
Looks like you didn't RTFM?
--log-file=FILE
--log-file-format=FORMAT
> I want to write (append !!) to the log file:
> - Which files were transferred
Is send by rsync to stdout.
> - When the rsync operation took place
Simply add a time stamp to your logfile, or see what above
"--log-file" can do for you, i have never used it.
> - How much bytes were transferred (total sum) in the rsync operation
Is send by rsync to stdout.
> How can I get such a log file otherwise?
Redirect stdout + stderr to your logfile and add a time stamp
prior to firing up rsync or see what "--log-file" can do for you.
> BTW: Does rsync delete remote files (from previous rsync operations) if they are not existing
> any more on the source system ?
Yep, using "--delete" as pointed out in the man page. Something
like the following should do the trick (untested):
rsync -avz --delete /source /destination 2>&1 >> $logfile
I left adding the time stamp as experiment for you.
Good luck
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo
(E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 353: Second-system effect.