Bug? backup_dir sometimes reported on STDOUT, sometimes not.

Wayne Davison wayned at samba.org
Sat Jul 4 16:50:32 GMT 2009


On Fri, Jul 03, 2009 at 10:46:13PM +0200, Axel Essbaum wrote:
> In the second case the "backup_dir" report in the output is apparently
> not on STDOUT.

In all versions of rsync prior to 3.1.0 (which is not yet released), the
"backup_dir is ..." message is output very early in the transfer, so a
remote rsync cannot send it over the protocol (since it is not yet setup
right for messages).  It instead sends it via STDERR (since STDOUT is
being used to talk to the client rsync).  3.1.0 fixes this by moving
this output later in the sequence of events, allowing the message to
come through the protocol and go to STDOUT as expected.

You have several options:

 - Don't use double verbosity, and the message won't be output at all.
   If you want to see unchanged files, you can try -ii as an alternative
   way to get that info (though it does show even attribute changes, and
   you'd need to be able to parse the new output format).

 - Use 3.1.0 -- it's in a stable state, and I'm hoping to get it
   released before too long.  (I use it for all my rsyncing.)

 - Patch the remote rsync to move that output from options.c to main.c.
   (See the attached patch.)

..wayne..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backup_dir.patch
Type: text/x-diff
Size: 1069 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20090704/e252f503/backup_dir.bin


More information about the rsync mailing list