Redirect --stats to STDERR.

2007-02-07 Thread LORAND Benoît

Hello,

   I have written a little script that's would email me all errors.
 rsync -vah --delete --stats sources destination 
/var/log/sauvegarde/listoffile.log 2 /var/log/sauvegarde/errors.log

   My problem is i want to have the stats in my mail. Is it possible to
redirect --stats to STDERR.

   I have tryed to do this :

   /--- rsync-2.6.9/main.c  2006-10-14
   01:46:32.0 +0200/
   /+++ rsync-2.6.9.new/main.c  2007-02-06
   19:28:08.0 +0100/
   /@@ -227,39 +227,39 @@/
   / {/
   /if (do_stats) {/
   /rprintf(FCLIENT, \n);/
   /-   rprintf(FINFO,Number of files:
   %d\n, stats.num_files);/
   /-   rprintf(FINFO,Number of files
   transferred: %d\n,/
   /+   rprintf(FERROR,Number of files:
   %d\n, stats.num_files);/
   /+   rprintf(FERROR,Number of files
   transferred: %d\n,/
   /stats.num_transferred_files);/
   /-   rprintf(FINFO,Total file size: %s
   bytes\n,/
   /+   rprintf(FERROR,Total file size: %s
   bytes\n,/
   /human_num(stats.total_size));/
   /-   rprintf(FINFO,Total transferred
   file size: %s bytes\n,/
   /+   rprintf(FERROR,Total transferred
   file size: %s bytes\n,/
   /
   human_num(stats.total_transferred_size));/
   /-   rprintf(FINFO,Literal data: %s
   bytes\n,/
   /+   rprintf(FERROR,Literal data: %s
   bytes\n,/
   /
   human_num(stats.literal_data));/
   /-   rprintf(FINFO,Matched data: %s
   bytes\n,/
   /+   rprintf(FERROR,Matched data: %s
   bytes\n,/
   /
   human_num(stats.matched_data));/
   /-   rprintf(FINFO,File list size:
   %d\n, stats.flist_size);/
   /+   rprintf(FERROR,File list size:
   %d\n, stats.flist_size);/
   /if (stats.flist_buildtime) {/
   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /File list
   generation time: %.3f seconds\n,/
   /
   (double)stats.flist_buildtime / 1000);/
   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /File list transfer
   time: %.3f seconds\n,/
   /
   (double)stats.flist_xfertime / 1000);/
   /}/
   /-   rprintf(FINFO,Total bytes sent:
   %s\n,/
   /+   rprintf(FERROR,Total bytes sent:
   %s\n,/
   /human_num(total_written));/
   /-   rprintf(FINFO,Total bytes
   received: %s\n,/
   /+   rprintf(FERROR,Total bytes
   received: %s\n,/
   /human_num(total_read));/
   /}/

   /if (verbose || do_stats) {/
   /rprintf(FCLIENT, \n);/
   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /sent %s bytes  received %s
   bytes  %s bytes/sec\n,/
   /human_num(total_written),
   human_num(total_read),/
   /human_dnum((total_written +
   total_read)/(0.5 + (endtime - starttime)), 2));/
   /-   rprintf(FINFO, total size is %s
   speedup is %.2f\n,/
   /+   rprintf(FERROR, total size is %s
   speedup is %.2f\n,/
   /human_num(stats.total_size),/
   /(double)stats.total_size /
   (total_written+total_read));/
   /}/


But the problem is i have an error 23 when i use rsync.




--
To unsubscribe or change options: 

Redirect --stats to STDERR.

2007-02-07 Thread Benoît LORAND

Hello,

   I have written a little script that's would email me all errors.
 rsync -vah --delete --stats sources destination  
/var/log/sauvegarde/listoffile.log 2 /var/log/sauvegarde/errors.log


   My problem is i want to have the stats in my mail. Is it possible to 
redirect --stats to STDERR.


   I have tryed to do this :

   /--- rsync-2.6.9/main.c  2006-10-14
   01:46:32.0 +0200/
   /+++ rsync-2.6.9.new/main.c  2007-02-06
   19:28:08.0 +0100/
   /@@ -227,39 +227,39 @@/
   / {/
   /if (do_stats) {/
   /rprintf(FCLIENT, \n);/
   /-   rprintf(FINFO,Number of files:
   %d\n, stats.num_files);/
   /-   rprintf(FINFO,Number of files
   transferred: %d\n,/
   /+   rprintf(FERROR,Number of files:
   %d\n, stats.num_files);/
   /+   rprintf(FERROR,Number of files
   transferred: %d\n,/
   /stats.num_transferred_files);/
   /-   rprintf(FINFO,Total file size: %s
   bytes\n,/
   /+   rprintf(FERROR,Total file size: %s
   bytes\n,/
   /human_num(stats.total_size));/
   /-   rprintf(FINFO,Total transferred
   file size: %s bytes\n,/
   /+   rprintf(FERROR,Total transferred
   file size: %s bytes\n,/
   /   
   human_num(stats.total_transferred_size));/

   /-   rprintf(FINFO,Literal data: %s
   bytes\n,/
   /+   rprintf(FERROR,Literal data: %s
   bytes\n,/
   /   
   human_num(stats.literal_data));/

   /-   rprintf(FINFO,Matched data: %s
   bytes\n,/
   /+   rprintf(FERROR,Matched data: %s
   bytes\n,/
   /   
   human_num(stats.matched_data));/

   /-   rprintf(FINFO,File list size:
   %d\n, stats.flist_size);/
   /+   rprintf(FERROR,File list size:
   %d\n, stats.flist_size);/
   /if (stats.flist_buildtime) {/
   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /File list
   generation time: %.3f seconds\n,/
   /   
   (double)stats.flist_buildtime / 1000);/

   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /File list transfer
   time: %.3f seconds\n,/
   /   
   (double)stats.flist_xfertime / 1000);/

   /}/
   /-   rprintf(FINFO,Total bytes sent:
   %s\n,/
   /+   rprintf(FERROR,Total bytes sent:
   %s\n,/
   /human_num(total_written));/
   /-   rprintf(FINFO,Total bytes
   received: %s\n,/
   /+   rprintf(FERROR,Total bytes
   received: %s\n,/
   /human_num(total_read));/
   /}/

   /if (verbose || do_stats) {/
   /rprintf(FCLIENT, \n);/
   /-   rprintf(FINFO,/
   /+   rprintf(FERROR,/
   /sent %s bytes  received %s
   bytes  %s bytes/sec\n,/
   /human_num(total_written),
   human_num(total_read),/
   /human_dnum((total_written +
   total_read)/(0.5 + (endtime - starttime)), 2));/
   /-   rprintf(FINFO, total size is %s 
   speedup is %.2f\n,/
   /+   rprintf(FERROR, total size is %s 
   speedup is %.2f\n,/

   /human_num(stats.total_size),/
   /(double)stats.total_size /
   (total_written+total_read));/
 

Re: Redirect --stats to STDERR.

2007-02-07 Thread Aaron W Morris

On 2/7/07, LORAND Benoît [EMAIL PROTECTED] wrote:

Hello,

I have written a little script that's would email me all errors.
  rsync -vah --delete --stats sources destination 
/var/log/sauvegarde/listoffile.log 2 /var/log/sauvegarde/errors.log

My problem is i want to have the stats in my mail. Is it possible to
redirect --stats to STDERR.

I have tryed to do this :

/--- rsync-2.6.9/main.c  2006-10-14
01:46:32.0 +0200/
/+++ rsync-2.6.9.new/main.c  2007-02-06
19:28:08.0 +0100/
/@@ -227,39 +227,39 @@/
/ {/
/if (do_stats) {/
/rprintf(FCLIENT, \n);/
/-   rprintf(FINFO,Number of files:
%d\n, stats.num_files);/
/-   rprintf(FINFO,Number of files
transferred: %d\n,/
/+   rprintf(FERROR,Number of files:
%d\n, stats.num_files);/
/+   rprintf(FERROR,Number of files
transferred: %d\n,/
/stats.num_transferred_files);/
/-   rprintf(FINFO,Total file size: %s
bytes\n,/
/+   rprintf(FERROR,Total file size: %s
bytes\n,/
/human_num(stats.total_size));/
/-   rprintf(FINFO,Total transferred
file size: %s bytes\n,/
/+   rprintf(FERROR,Total transferred
file size: %s bytes\n,/
/
human_num(stats.total_transferred_size));/
/-   rprintf(FINFO,Literal data: %s
bytes\n,/
/+   rprintf(FERROR,Literal data: %s
bytes\n,/
/
human_num(stats.literal_data));/
/-   rprintf(FINFO,Matched data: %s
bytes\n,/
/+   rprintf(FERROR,Matched data: %s
bytes\n,/
/
human_num(stats.matched_data));/
/-   rprintf(FINFO,File list size:
%d\n, stats.flist_size);/
/+   rprintf(FERROR,File list size:
%d\n, stats.flist_size);/
/if (stats.flist_buildtime) {/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/File list
generation time: %.3f seconds\n,/
/
(double)stats.flist_buildtime / 1000);/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/File list transfer
time: %.3f seconds\n,/
/
(double)stats.flist_xfertime / 1000);/
/}/
/-   rprintf(FINFO,Total bytes sent:
%s\n,/
/+   rprintf(FERROR,Total bytes sent:
%s\n,/
/human_num(total_written));/
/-   rprintf(FINFO,Total bytes
received: %s\n,/
/+   rprintf(FERROR,Total bytes
received: %s\n,/
/human_num(total_read));/
/}/

/if (verbose || do_stats) {/
/rprintf(FCLIENT, \n);/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/sent %s bytes  received %s
bytes  %s bytes/sec\n,/
/human_num(total_written),
human_num(total_read),/
/human_dnum((total_written +
total_read)/(0.5 + (endtime - starttime)), 2));/
/-   rprintf(FINFO, total size is %s
speedup is %.2f\n,/
/+   rprintf(FERROR, total size is %s
speedup is %.2f\n,/
/human_num(stats.total_size),/
/(double)stats.total_size /
(total_written+total_read));/
   

Re: Redirect --stats to STDERR.

2007-02-07 Thread LORAND Benoît

Aaron W Morris a écrit :

On 2/7/07, LORAND Benoît [EMAIL PROTECTED] wrote:

Hello,

I have written a little script that's would email me all errors.
  rsync -vah --delete --stats sources destination 
/var/log/sauvegarde/listoffile.log 2 /var/log/sauvegarde/errors.log

My problem is i want to have the stats in my mail. Is it possible to
redirect --stats to STDERR.

I have tryed to do this :

/--- rsync-2.6.9/main.c  2006-10-14
01:46:32.0 +0200/
/+++ rsync-2.6.9.new/main.c  2007-02-06
19:28:08.0 +0100/
/@@ -227,39 +227,39 @@/
/ {/
/if (do_stats) {/
/rprintf(FCLIENT, \n);/
/-   rprintf(FINFO,Number of files:
%d\n, stats.num_files);/
/-   rprintf(FINFO,Number of files
transferred: %d\n,/
/+   rprintf(FERROR,Number of files:
%d\n, stats.num_files);/
/+   rprintf(FERROR,Number of files
transferred: %d\n,/
/
stats.num_transferred_files);/

/-   rprintf(FINFO,Total file size: %s
bytes\n,/
/+   rprintf(FERROR,Total file size: %s
bytes\n,/
/
human_num(stats.total_size));/

/-   rprintf(FINFO,Total transferred
file size: %s bytes\n,/
/+   rprintf(FERROR,Total transferred
file size: %s bytes\n,/
/
human_num(stats.total_transferred_size));/
/-   rprintf(FINFO,Literal data: %s
bytes\n,/
/+   rprintf(FERROR,Literal data: %s
bytes\n,/
/
human_num(stats.literal_data));/
/-   rprintf(FINFO,Matched data: %s
bytes\n,/
/+   rprintf(FERROR,Matched data: %s
bytes\n,/
/
human_num(stats.matched_data));/
/-   rprintf(FINFO,File list size:
%d\n, stats.flist_size);/
/+   rprintf(FERROR,File list size:
%d\n, stats.flist_size);/
/if (stats.flist_buildtime) {/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/File list
generation time: %.3f seconds\n,/
/
(double)stats.flist_buildtime / 1000);/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/File list transfer
time: %.3f seconds\n,/
/
(double)stats.flist_xfertime / 1000);/
/}/
/-   rprintf(FINFO,Total bytes sent:
%s\n,/
/+   rprintf(FERROR,Total bytes sent:
%s\n,/
/human_num(total_written));/
/-   rprintf(FINFO,Total bytes
received: %s\n,/
/+   rprintf(FERROR,Total bytes
received: %s\n,/
/human_num(total_read));/
/}/

/if (verbose || do_stats) {/
/rprintf(FCLIENT, \n);/
/-   rprintf(FINFO,/
/+   rprintf(FERROR,/
/sent %s bytes  received %s
bytes  %s bytes/sec\n,/
/human_num(total_written),
human_num(total_read),/
/human_dnum((total_written +
total_read)/(0.5 + (endtime - starttime)), 2));/
/-   rprintf(FINFO, total size is %s
speedup is %.2f\n,/
/+   rprintf(FERROR, total size is %s
speedup is %.2f\n,/
/
human_num(stats.total_size),/

/(double)stats.total_size /

Re: Redirect --stats to STDERR.

2007-02-07 Thread Wayne Davison
On Wed, Feb 07, 2007 at 05:19:16PM +0100, LORAND Beno?t wrote:
I have written a little script that's would email me all errors.
  rsync -vah --delete --stats sources destination 
 /var/log/sauvegarde/listoffile.log 2 /var/log/sauvegarde/errors.log
 
My problem is i want to have the stats in my mail. Is it possible to
 redirect --stats to STDERR.

Since you're using 2.6.9, try using --log-file=FILE for the list of
changed files (instead of using -v), and then email the entire output
of stdout and stderr combined.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


DO NOT REPLY [Bug 4378] New: Handling of symbolic links

2007-02-07 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4378

   Summary: Handling of symbolic links
   Product: rsync
   Version: 2.6.6
  Platform: x86
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P3
 Component: core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
 QAContact: [EMAIL PROTECTED]


RSync ignores symbolic links by default (warning written out).

Scenario: 'dirA' contains files and links and should be synchronized with
'dirB' and vice versa.

   rsync -v --delete dirA dirB

copies files from A to B and lets links in A. The opposite command

   rsync -v --delete dirB dirA

should now do nothing because directories are in sync. Instead of this the
command deletes the links in A.

I argue that links should not be deleted if they are ignored in the opposite
direction. Otherwise it is not possible to write symmetric commands. Of
course the same is true for the other variants of link treatment (not tested by
me).


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html