[Code study]should we remove if (motd *motd) section?
Dear List, I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. If so, should we remove this section? Or there might be some where I missed? Please correct me, if I'm wrong. Thanks in advance. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); if (motd *motd) { FILE *f = fopen(motd,r); while (f !feof(f)) { int len = fread(buf, 1, bufsiz - 1, f); if (len 0) write_buf(f_out, buf, len); } if (f) fclose(f); write_sbuf(f_out, \n); } } static void init_globals(void) { memset(Globals, 0, sizeof Globals); } -- Daniel -- 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
rsync: writefd_unbuffered failed to write 4 bytes on mounted share
Hello, we are using rsync to backup data to a NAS share. The share is mounted with the following command: mount -t nfs 192.168.1.101:/nas/NASDisk-3/public /media/nas -o timeo=5,rsize=8096,wsize=8096,soft rsync is called by rsnapshot with the command: rsync -a --stats --delete --numeric-ids --relative --delete-excluded /samba /media/nas The process crashes when it tries to copy *.mdb files (15-600MB): rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32) rsync: close failed on /media/nas/daily.0/samba/Bereiche/Auslieferung/Software/NT2/2012/2012-69-RA-1L.0968 (XY_I)/2006-11-16/XY_app.968/Logdb/.XYlog.mdb.REP380: Input/output error (5) rsync error: error in file IO (code 11) at receiver.c(688) [receiver=3.0.3] rsync: connection unexpectedly closed (65324 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(635) [sender=3.0.3] The FAQ mentions this kind of error but only in combination with a rsyncd running on the remote site. BTW: rsync is version 3.0.3 Thanks for any hints or suggestions, Stefan -- 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
Re: [Code study]should we remove if (motd *motd) section?
On Mon 27 Apr 2009, Daniel.Li wrote: I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); ^^ if (motd *motd) { It's being assigned the line above the (motd *motd) part! Paul -- 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
Re: [Code study]should we remove if (motd *motd) section?
On Mon, 2009-04-27 at 12:41 +0200, Paul Slootman wrote: On Mon 27 Apr 2009, Daniel.Li wrote: I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); ^^ if (motd *motd) { It's being assigned the line above the (motd *motd) part! Sorry, I forgot to paste below macros. Yes, it's assigned, but this function just returns default() or global values. But it seems never assigned. loadparam.c #line 394 FN_GLOBAL_STRING(lp_motd_file, Globals.motd_file) loadparam.c #line 374~375 #define FN_GLOBAL_STRING(fn_name,ptr) \ char *fn_name(void) {return(*(char **)(ptr) ? *(char **)(ptr) : );} So the function will return or it's assigned value. char *lp_motd_file(void) { return(*(char **)(Globals.motd_file) ? *(char **)(Globals.motd_file) : ); } Paul -- Daniel -- 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
Re: [Code study]should we remove if (motd *motd) section?
On Mon, Apr 27, 2009 at 07:27:38PM +0800, Daniel.Li wrote: On Mon, 2009-04-27 at 19:21 +0800, Daniel.Li wrote: On Mon, 2009-04-27 at 12:41 +0200, Paul Slootman wrote: On Mon 27 Apr 2009, Daniel.Li wrote: I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); ^^ if (motd *motd) { It's being assigned the line above the (motd *motd) part! Sorry, I forgot to paste below macros. Yes, it's assigned, but this function just returns default() or global values. But it seems never assigned. What I mean is Globals.motd_file is NEVER assigned. When we use default . Then we still will NOT go into if (motd *motd), as *motd == 0. I'd guess it is assigned in the code that parses configuration file (rsyncd.conf). What if you set 'motd file = /etc/rsync.motd' in /etc/rsyncd.conf? -- Best regards / s pozdravem Petr Uzel, Packages maintainer - SUSE LINUX, s.r.o. e-mail: pu...@suse.cz Lihovarská 1060/12 tel: +420 284 028 964 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz -- 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
Re: [Code study]should we remove if (motd *motd) section?
On Mon, 2009-04-27 at 19:21 +0800, Daniel.Li wrote: On Mon, 2009-04-27 at 12:41 +0200, Paul Slootman wrote: On Mon 27 Apr 2009, Daniel.Li wrote: I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); ^^ if (motd *motd) { It's being assigned the line above the (motd *motd) part! Sorry, I forgot to paste below macros. Yes, it's assigned, but this function just returns default() or global values. But it seems never assigned. What I mean is Globals.motd_file is NEVER assigned. When we use default . Then we still will NOT go into if (motd *motd), as *motd == 0. What do u think? loadparam.c #line 394 FN_GLOBAL_STRING(lp_motd_file, Globals.motd_file) loadparam.c #line 374~375 #define FN_GLOBAL_STRING(fn_name,ptr) \ char *fn_name(void) {return(*(char **)(ptr) ? *(char **)(ptr) : );} So the function will return or it's assigned value. char *lp_motd_file(void) { return(*(char **)(Globals.motd_file) ? *(char **)(Globals.motd_file) : ); } Paul -- Daniel Daniel -- 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
Re: [Code study]should we remove if (motd *motd) section?
On Mon, 2009-04-27 at 13:34 +0200, Petr Uzel wrote: On Mon, Apr 27, 2009 at 07:27:38PM +0800, Daniel.Li wrote: On Mon, 2009-04-27 at 19:21 +0800, Daniel.Li wrote: On Mon, 2009-04-27 at 12:41 +0200, Paul Slootman wrote: On Mon 27 Apr 2009, Daniel.Li wrote: I'm confused when we will run into if (motd *motd)? As I have found that Globals is set 0 during initialization, and I didn't find anywhere else assign the value. clientserver.c #line 147~160 if (!am_client) { motd = lp_motd_file(); ^^ if (motd *motd) { It's being assigned the line above the (motd *motd) part! Sorry, I forgot to paste below macros. Yes, it's assigned, but this function just returns default() or global values. But it seems never assigned. What I mean is Globals.motd_file is NEVER assigned. When we use default . Then we still will NOT go into if (motd *motd), as *motd == 0. I'd guess it is assigned in the code that parses configuration file (rsyncd.conf). What if you set 'motd file = /etc/rsync.motd' in /etc/rsyncd.conf? Humm... Thanks for the point. load_config - lp_load - pm_process - do_parameter do_parameter compares motd file, like a key, then assigned Globals.motd_file = /etc/rsync.motd Well, NOW, take a close look at motd file, I know, it's something like welcome message. And the rsync protocol 30 only support 1024 chars of welcome message. Thanks :) -- Best regards / s pozdravem Petr Uzel, Packages maintainer - SUSE LINUX, s.r.o. e-mail: pu...@suse.cz Lihovarská 1060/12 tel: +420 284 028 964 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz -- Daniel -- 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
Re: [Code study]append_mode definitions
On Mon, Apr 27, 2009 at 10:33:02AM +0800, Daniel.Li wrote: Can anyone help to explain definitions of variable append_mode? There are two different type of appending (see the man page) depending on how new rsync is and how much of the file should be checksummed. The option is also disabled if a file is being fixed during a redo event. ..wayne.. -- 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
Re: rsync: writefd_unbuffered failed to write 4 bytes on mounted share
On Mon, Apr 27, 2009 at 12:19:10PM +0200, Stefan-Michael Guenther wrote: rsync: close failed on /media/nas/daily.0/samba/Bereiche/Auslieferung/Software/NT2/2012/2012-69-RA-1L.0968 (XY_I)/2006-11-16/XY_app.968/Logdb/.XYlog.mdb.REP380: Input/output error (5) That's an OS error when rsync closed a file it was writing, so you'll need to figure out what your OS is telling you about that failure on that disk. ..wayne.. -- 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
Re: [Code study]append_mode definitions
On Mon, 2009-04-27 at 06:44 -0700, Wayne Davison wrote: On Mon, Apr 27, 2009 at 10:33:02AM +0800, Daniel.Li wrote: Can anyone help to explain definitions of variable append_mode? There are two different type of appending (see the man page) depending on how new rsync is and how much of the file should be checksummed. We are studying ver 3.0.5. So there are three states: 1) append_mode = 0, NONE append mode. 2) append_mode = 1, --append If file size on the receiver is the same or longer than the size on the sender, the file is skipped 3) append_mode = 2, --append-verify This works just like the --append option, but the existing data on the receiving side is included in the full-file checksum verification step The option is also disabled if a file is being fixed during a redo event. I didn't get it. Can u help to explain a little bit more? Thanks. But I still doesn't know why append_mode = -append_mode in those files? generate.c #line2102,2127 append_mode = -append_mode; receive.c #line503,513 append_mode = -append_mode; send.c #line248,254 append_mode = -append_mode; ..wayne.. --- Daniel -- 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
Re: purge-empty-dirs and max-file-size confusion
On Fri, Apr 24, 2009 at 02:19:42PM -0400, Ian! D. Allen wrote: There is no mention of the concept of transfer rule in the rsync man page. I offer some proposed man page wording changes, below. Thanks. I have committed some manpage changes that clarify this unexpected behavior. At some point rsync may allow actual filtering of files by their (non-name) attributes, which would avoid this situation. ..wayne.. -- 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
Re: [PATCH] allow to disable SLP with runtime option
On Wed, Apr 22, 2009 at 04:14:23PM +0200, Petr Uzel wrote: It adds a new global boolean option, 'disable slp', which can be used to disable SLP advertisements at runtime. I've taken your patch and changed the boolean into a use slp global daemon parameter (default: enabled). I also made sure that if slp is disabled, that there is no slp timeout processing (or services could get enabled at the first timeout). The updated slp patch is now in git. Thanks! ..wayne.. -- 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
Rsync (cwrsync) log file
Greetings - There is probably a simple answer to this, but I can't seem to figure it out. I would like to have a clean log file of each rsync operation; in other words I don't want to have rsync append to the existing log file, but instead create a new one each time after deleting the old one. My situation is this; I run rsync from a shell script on my Linux server which backs up our working data directories on the server. The rsync command is copying the files to my Vista desktop box that is running cwRsync. The purpose of this is to have an emergency backup of our working data directories in case of a hardware failure on our server, which could be used to keep staff working during the period when the server hardware is being replaced. My script is run from cron nightly and it is working fine. The problem is that my log file is growing each day and I would like it to replace the existing log rather than append to it. I am having the logs written to the Vista box as defined in my cwRsync configuration file on the Vista box. Since the file is on the Vista machine, I can not just add a line in my (Linux) script to delete the existing log file before running the rsync command. What would be a simple, or appropriate, way to do this? I would like to have the log file remain on the Vista box. Thanks. Jeff Boyce www.meridianenv.com -- 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
[SCM] The rsync repository. branch, master, updated. v3.0.3-188-gfd2b604
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project The rsync repository.. The branch, master has been updated via fd2b6046cb0afc960da8cbd2c1dab40c786f8097 (commit) from a8e6e1486960fe2e9ac190ad53e9830f0f3f900a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit fd2b6046cb0afc960da8cbd2c1dab40c786f8097 Author: Wayne Davison way...@samba.org Date: Mon Apr 27 07:21:56 2009 -0700 Clarify which options are transfer rules, and what that means. --- Summary of changes: rsync.yo | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) hooks/post-receive -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. branch, b3.0.x, updated. v3.0.6pre1-3-g40b3a59
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project The rsync repository.. The branch, b3.0.x has been updated via 40b3a59fc836de5319826bb4793060fafdba12d7 (commit) from 4640ae85fe8b35d3410b319f532e3ad9ff7eac79 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 40b3a59fc836de5319826bb4793060fafdba12d7 Author: Wayne Davison way...@samba.org Date: Mon Apr 27 07:21:56 2009 -0700 Clarify which options are transfer rules, and what that means. --- Summary of changes: rsync.yo | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) hooks/post-receive -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs