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..
--- a/main.c +++ b/main.c @@ -76,7 +76,9 @@ extern char *rsync_path; extern char *shell_cmd; extern char *batch_name; extern char *password_file; +extern char *backup_dir; extern char curr_dir[MAXPATHLEN]; +extern char backup_dir_buf[MAXPATHLEN]; extern struct file_list *first_flist; extern struct filter_list_struct daemon_filter_list; @@ -752,6 +754,9 @@ static int do_recv(int f_in, int f_out, char *local_name) exit_cleanup(RERR_IPC); } + if (backup_dir && verbose > 1) + rprintf(FINFO, "backup_dir is %s\n", backup_dir_buf); + io_flush(NORMAL_FLUSH); if ((pid = do_fork()) == -1) { --- a/options.c +++ b/options.c @@ -1504,8 +1504,6 @@ int parse_arguments(int *argc_p, const char ***argv_p) backup_dir_buf[backup_dir_len++] = '/'; backup_dir_buf[backup_dir_len] = '\0'; } - if (verbose > 1 && !am_sender) - rprintf(FINFO, "backup_dir is %s\n", backup_dir_buf); } else if (!backup_suffix_len && (!am_server || !am_sender)) { snprintf(err_buf, sizeof err_buf, "--suffix cannot be a null string without --backup-dir\n");
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html