help rsync on Cygwin cannot configure --enable-iconv
Hi I need -iconv option, but configure didnt find iconv $ cygcheck -c libiconv Cygwin Package Information Package VersionStatus libiconv 1.14-3 OK $ ./configure --enable-iconv=yes --disable-acl-support ... checking for library containing iconv_open... no checking for library containing libiconv_open... no ... $ make ... $ ./rsync.exe --help |grep iconv append, no ACLs, no xattrs, no iconv, symtimes, prealloc How i can say configure about libiconv? Laboratory of Medical Ultrasound Devices Scientific Department SPbSPU -- 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
help rsync on Cygwin cannot configure --enable-iconv
Hi I need -iconv option, but configure didnt find iconv $ cygcheck -c libiconv Cygwin Package Information Package VersionStatus libiconv 1.14-3 OK $ ./configure --enable-iconv=yes --disable-acl-support ... checking for library containing iconv_open... no checking for library containing libiconv_open... no ... $ make ... $ ./rsync.exe --help |grep iconv append, no ACLs, no xattrs, no iconv, symtimes, prealloc How i can say configure about libiconv? -- Best regards, Roman Romanovskiy +79217447768 +78122909636 Laboratory of Medical Ultrasound Devices Scientific Department SPbSPU -- 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: looking for Windows rsync without cygwin
On Wed, Dec 31, 2008 at 9:06 PM, Eric S. Johansson e...@harvee.org wrote: I'm going to try the bandwidth limit and retries tomorrow. I wanted to see if there were some other suggestions. We're using the latest cwRsync in daemon mode over IPsec to transfer about 100 GB per day from several sources to our DR site, and we have not experienced any lock-ups for over a year. We did have such problems with older cwRsync versions long ago. What OS versions are involved? If your're using Win 2003 or newer, I would make sure that TCP Chimney offload is disabled. Apparently many third-party drivers enable TCP offload functions by default even though the drivers or hardware is known to be buggy in handling of some offload functions. We had all sorts of (very) intermittent connectivity problems (hangs, drops, etc.) until we disabled all TCP Offload functions on our severs with integrated Broadcom NICs. Problems would occur about once per week on a high-volume database server, and so it took forever to figure out what was going on. Worth looking at perhaps... -- RPM -- 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
looking for Windows rsync without cygwin
wondering if anyone has built a native port yet. It looks like I may have to go through eliminate delta copy from a half a dozen machines because of transfer lockups. Conversation on the rsnapshot list indicates that using cygwin may be the source of my problems. Yes, there's a well-known Cygwin hang bug that rsync seems to hit especially often. IIRC, the problem is that the Windows API doesn't provide the necessary functionality to fully emulate select(2) on pipes, so Cygwin does the best it can and fails sometimes. Setting a --bwlimit may avoid the hang if the speed reduction is acceptable. I'm going to try the bandwidth limit and retries tomorrow. I wanted to see if there were some other suggestions. thanks -- 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 on cygwin, some directories are erroring with Permission denied
Hi, I have rsync set up to sync between two hard drives on the same Windows PC. I have a concern the results of the following rsync command: c:\cygwin\bin\rsync.exe --log-file=080725.pcsync.log --recursive --archive --modify-window=2 --update --backup /cygdrive/f/images/ /cygdrive/i/images/ This results in: rsync: failed to set permissions on /cygdrive/i/images/.: Permission denied (13) rsync error: some files could not be transferred (code 23) at /home/lapo/packaging/tmp/rsync-2.6.9/main.c(977) [sender=2.6.9] It's weird that it throws up an error in the . local directory, it seems odd that it's even syncing the . local directory. Does anybody have any ideas why this is happening and what I can do to stop this error. Thanks in advance. Richard. _ Find the best and worst places on the planet http://clk.atdmt.com/UKM/go/101719807/direct/01/-- 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 iconv (Cygwin) (file has vanished)
At 13:23 27.01.2008 +0900, Brendan Grieve wrote: Wayne Davison wrote: On Thu, Jan 24, 2008 at 02:09:30PM +0900, Brendan Grieve wrote: I get the following error on files that have russian cryllic letters: - file has vanished: /cygdrive/D/Data_Tier1/Home/xxx/??? See the prior discussions about how MS Windows is lying to rsync about what the filenames are (giving it names that it can't use in an open() call). I have heard that there is an executable flag you can set to get MS Windows to stop this, but I don't use MS Windows to know for sure. Just to save people in the future searching, a link to a post that goes into a little detail about this problem is: - http://lists.samba.org/archive/rsync/2005-May/012638.html I use the hacked cygwin1.dll to work around it. I was hoping the iconv flag would fix this issue, but its definitely more to do with the interaction between MS Windows and Cygwin rather than anything to do with rsync. This may also be of help (or at least worth a try): http://lists.samba.org/archive/rsync/2007-September/018656.html bye Fabi -- 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 iconv (Cygwin) (file has vanished)
On Thu, Jan 24, 2008 at 02:09:30PM +0900, Brendan Grieve wrote: I get the following error on files that have russian cryllic letters: - file has vanished: /cygdrive/D/Data_Tier1/Home/xxx/??? See the prior discussions about how MS Windows is lying to rsync about what the filenames are (giving it names that it can't use in an open() call). I have heard that there is an executable flag you can set to get MS Windows to stop this, but I don't use MS Windows to know for sure. ..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
Re: Rsync iconv (Cygwin) (file has vanished)
Wayne Davison wrote: On Thu, Jan 24, 2008 at 02:09:30PM +0900, Brendan Grieve wrote: I get the following error on files that have russian cryllic letters: - file has vanished: /cygdrive/D/Data_Tier1/Home/xxx/??? See the prior discussions about how MS Windows is lying to rsync about what the filenames are (giving it names that it can't use in an open() call). I have heard that there is an executable flag you can set to get MS Windows to stop this, but I don't use MS Windows to know for sure. ..wayne.. Just to save people in the future searching, a link to a post that goes into a little detail about this problem is: - http://lists.samba.org/archive/rsync/2005-May/012638.html I use the hacked cygwin1.dll to work around it. I was hoping the iconv flag would fix this issue, but its definitely more to do with the interaction between MS Windows and Cygwin rather than anything to do with rsync. Brendan -- 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 iconv (Cygwin) (file has vanished)
I have another question. I'm not sure if this is the correct post for cygwin rsync related questions. I've compiled rsync 3.0.0pre8 under cygwin. Works splendidly and compiles cleanly. I made sure to have libiconv installed and it supports the --iconv command (at least it accepts it). I've been using rsync to test a backup of some files from a windows box to a linux box. I use the following command under windows: - rsync.exe -v -rlt -z --delete -y --delete-excluded --partial-dir=/.rsync-partial --iconv=utf-8,utf-8 /cygdrive/D/Data_Tier1/ [EMAIL PROTECTED]::virtualdir/Data_Tier1/ I get the following error on files that have russian cryllic letters: - --- file has vanished: /cygdrive/D/Data_Tier1/Home/xxx/??? (thousands more entries similar) --- Am I doing something wrong? I've also using: - --iconv=. The user I run as definitely had permissions on those files. Brendan -- 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 in cygwin to my linux nslu2 has permissions problems
(I'm using an ssh connection since I plan to do this over the internet in the future)When I try to backup, most of the files are copied. Trouble is, some aren't since some directories are copied over and land on my linux box with permissions of 000. Because of that, rsync can't copy any other files into that dir and moves on. I'd really just like rsync to copy over files all at the same permission level (say 770) or something. Is that possible? -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Solution to rsync plus cygwin: language problems with filenames
Hello, I created a patch for cygwin1.dll which solves a problem with rsync on cygwin platform, caused by national characters in filenames (file has vanished error message). Patch, cygwin1.dll and readme available at http://www.7bulls.com/~nergal/misc/cygwin-ld_utf/ The patch received little testing, but so far it works for me. I would like to hear comments, especially if someone finds information in readme.txt incomplete or incorrect. RW -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Windows rsync without cygwin (looking for Unicode support).
Hi! Let's share an info about Windows rsyncs or rsync-compatibles that works wint Windows native libs, not cygwin. The main task - find a solution with Unicode support. I know two: Unison - has a problems with Unicode filenames like cygwin does. DeltaCopy - found it just a few minutes ago, can't try from home so can't comment out. Any others? G. -- 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: Windows rsync without cygwin (looking for Unicode support).
Title: Windows rsync without cygwin (looking for Unicode support). I posted here a few weeks ago. We wrote a port of rsync to .net, with unicode support. The binary is available at www.kolosy.com/downloads/NetSync.exe, the source code is available through subversion at svn://www.kolosy.com/svn-repository. From: [EMAIL PROTECTED] on behalf of Georgy GoshinSent: Fri 4/7/2006 3:29 PMTo: rsync@lists.samba.orgSubject: Windows rsync without cygwin (looking for Unicode support). Hi!Let's share an info about Windows rsyncs or rsync-compatibles that workswint Windows native libs, not cygwin. The main task - find a solution withUnicode support.I know two:Unison - has a problems with Unicode filenames like cygwin does.DeltaCopy - found it just a few minutes ago, can't try from home so can'tcomment out.Any others?G.--To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsyncBefore posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- 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 plus cygwin: language problems with filenames
I know this problem has been posted before, but I have been unable to find a solution on this list or anywhere else on the net. Let me review. First, here is my setup: OS: Windows XP Pro SP2 Rsync: 2.6.6-1 Cygwin: 2.510.2.2 Whenever I transfer any file that has Japanese characters in it, the following message appears in the screen output: C:\Documents and Settings\Steversync -avvz --delete /cygdrive/c/test /cygdrive/c/test2 building file list ... file has vanished: /cygdrive/c/test/01 - ??.mp3 done deleting in test IO error encountered -- skipping file deletion delta-transmission disabled for local transfer or --whole-file test/New Text Document.txt is uptodate total: matches=0 tag_hits=0 false_alarms=0 data=0 sent 119 bytes received 32 bytes 302.00 bytes/sec total size is 0 speedup is 0.00 rsync warning: some files vanished before they could be transferred (code 24) at /home/lapo/packaging/tmp/rsync-2.6.6/main.c(791) So far, this is the best explanation I have found for what may be happening: http://lists.samba.org/archive/rsync/2005-May/012599.html Also, people have pinned it down to a Windows language setting problem: http://lists.samba.org/archive/rsync/2005-May/012611.html I confirmed this for myself by going into Regional and Language Options, Advanced, and choosing Japanese for the language I wanted to use in non-Unicode programs. Now, it will transfer the Japanese files fine. It will also transfer most English language files. However, it then has a problem with accented letters, which I assume must have been part of the English (United States) settings. I further proved that it is very likely just a Windows problem by trying to copy one of the files in Ubuntu Linux. It worked perfectly with rsync 2.6.5 and I bet it would've done the same thing with 2.6.6. Has anyone made any progress in solving this problem? I noticed that the NEWS file for rsync 2.6.7 (http://www.samba.org/ftp/rsync/rsync-2.6.7-NEWS) discusses an improvement in escaping unreadable characters. Is that related to this problem? I'm new to cygwin and I'm not sure which binary I should be using or whether I have to wait for cygwin to come out with it in their own system. I'd really like to get this to work. This is one tiny problem in an otherwise flawless solution to my backup needs. Please let me know if you have any ideas to make this work. Thanks for reading. -Steve -- 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 plus cygwin: language problems with filenames
I thought the problem was that cygwin doesn't support unicode. See here: http://lists.samba.org/archive/rsync/2002-September/003643.html The post is rather old, but for whatever reason the cygwin folks haven't added unicode support. You'll also see this problem manifest itself as a limit in the path length that the cygwin compiled version of rsync supports. -- 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 plus cygwin: language problems with filenames
On Mon, Mar 13, 2006 at 11:12:48PM -0800, Steve Robinson wrote: I further proved that it is very likely just a Windows problem by trying to copy one of the files in Ubuntu Linux. Yes, this is something that MS Windows is doing outside of rsync's control, so it is not something that the main rsync distribution is even looking at because there's nothing to fix in the main distribution. This may be something that the cygwin folks can look into fixing, though. The problem is that rsync asks for the name of a file via readdir(), and MS Windows munges the name instead of returning it verbatim. Rsync then tries to use the provided filename to open the file, and MS Windows says that it doesn't exist. At that point there's nothing rsync can do. Perhaps the cygwin version of rsync could be marked as understanding unicode -- something that I assume the cygwin packagers would do when building the rsync package. ..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
Unable to use rsync between Cygwin - Mac OS X 10.4 with files and folders with accent in their name
I try to synchronize from a Windows 2003 machine, using Cygwin and rsync 2.6.6 files and folder with ACCENT in their name to a Mac OS X 10.4 machine running rsync 2.6.3 as a daemon. 3 different problems happen : ***1. For a single file to an empty destination: $ rsync -vP combin\351s_froid.pdf mac-mini::tests combin\351s_froid.pdf 953977 100% 154.95kB/s 0:00:05 (1, 100.0% of 1) rsync: mkstemp /.combinés_froid.pdf.5accjU (in tests) failed: Invalid argument (22) sent 954182 bytes received 32 bytes 146802.15 bytes/sec total size is 953977 speedup is 1.00 rsync error: some files could not be transferred (code 23) at /home/lapo/packaging/tmp/rsync-2.6.6/main.c(791) REMARK that happen only if the path on the mac on which point tests is empty, otherwise you have the second problem. To reproduce it I've just enter the command `touch toto` in tests folder on the mac. ***2. For a single file to a non-empty destination: $ rsync -vP combin\351s_froid.pdf mac-mini::tests sent 45 bytes received 12 bytes 114.00 bytes/sec total size is 953977 speedup is 16736.44 and nothing is written on destination. If I empty the destination folder and launch again the same command. I return to problem 1 ***3. For a folder $ rsync -vrP Le\ Petit\ \351lectrom\351nager mac-mini::tests building file list ... 2 files to consider rsync: recv_generator: mkdir /Le Petit électroménager (in tests) failed: Invalid argument (22) rsync: stat /Le Petit électroménager (in tests) failed: Invalid argument (22) rsync: recv_generator: mkdir /Le Petit électroménager (in tests) failed: Invalid argument (22) rsync: stat /Le Petit électroménager (in tests) failed: Invalid argument (22) sent 84 bytes received 12 bytes 64.00 bytes/sec total size is 953977 speedup is 9937.26 rsync error: some files could not be transferred (code 23) at /home/lapo/packaging/tmp/rsync-2.6.6/main.c(791) Do not hesitate to contact me for further information. I did my best to make it as clear as possible, but it's my first bug report. Regards, Bertrand L -- 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, windows/cygwin and special characters in filenames
Hello, I'm using cygwin and rsync in my windows-equipped laptop to synchronize work and other documents between my file server (Linux RH 9) and laptop. As I'm Finnish, many of the transferred files have special characters å,ä,ö (A-umlaut etc) in the filenames. I noticed that when the files are synced from the server to my windows box, the rsync translates the special characters to quotes. This is a little bit problematic as there may be depencies and links between the files. Does anyone has an idea how this could be solved? Thank you, Ville Mattila -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync, windows/cygwin and special characters in filenames
On Thu, Jun 17, 2004 at 09:25:50PM +0300, Ville Mattila wrote: I noticed that when the files are synced from the server to my windows box, the rsync translates the special characters to quotes. Rsync does not translate any characters, so the problem is most likely that the font you are using in Windows is not compatible with the character set you want to display (e.g. Windows tends to use CP 1252). ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync, windows/cygwin and special characters in filenames
Wayne Davison wrote: On Thu, Jun 17, 2004 at 09:25:50PM +0300, Ville Mattila wrote: I noticed that when the files are synced from the server to my windows box, the rsync translates the special characters to quotes. Rsync does not translate any characters, so the problem is most likely that the font you are using in Windows is not compatible with the character set you want to display (e.g. Windows tends to use CP 1252). OK thanks for your reply! I'm not sure about the character set at this moment. Everything works fine when I use the files in my local network over Samba. Special characters are shown and saved without any problems. The problem appears not before I want to copy the file structure to my laptop. Thank you, Ville -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Rsync under cygwin
Hi, I have rsync client and servers running under 3 Win2K boxes, and I can sync when the source is remote and the target is local, but when the source is local and the target is remote, I get the following error: rsync.exe --recursive /cygdrive/d/BILLS_CMS rsync://192.168.213.102/PWB3 rsync: read error: Connection aborted rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/tmp/rsync-2.6.0/io.c(201) And this is server's configuration file: #PWB1 - Rsync.conf file #These are the Global options for this server #[GLOBAL OPTIONS] #Message for any client connecting motd file = /var/rsync.motd #Log file for this server log file = /var/rsync.pwb1.log #Only the 2 other servers should be able to connect hosts allow = 192.168.213.101 192.168.213.102 #Log everything transfer logging = yes #The format of the log file #Format is : #time [pid] op remote_host [remote_ip] module (user) file length bytes_sent checksum log format = %o %h [%a] %m (%u) %f %l %b %c #No timeout timeout = 0 #No directory listing list = no #This is module that can sync'ed against [PWB1] #PATH to the module path = /cygdrive/d/BILLS_CMS #Comment comment = Bills Office Repository Is there some error in the way the server is setup, so that the client aborts, or is this a bug? Thanks -- Darragh Sherwin OpenOffice.org Developer for Propylon http://www.propylon.com +353-1-4927456 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: SV: Rsync under cygwin
Hi Tevfik, I'm gettting the same error when I try that command. Thanks Tevfik Karagulle wrote: Hi, Try rsync.exe --recursive /cygdrive/d/BILLS_CMS 192.168.213.102::PWB3 Rgrds Tev -Opprinnelig melding- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] vegne av Darragh Sherwin Sendt: 25. februar 2004 12:39 Til: [EMAIL PROTECTED] Emne: Rsync under cygwin Hi, I have rsync client and servers running under 3 Win2K boxes, and I can sync when the source is remote and the target is local, but when the source is local and the target is remote, I get the following error: rsync.exe --recursive /cygdrive/d/BILLS_CMS rsync://192.168.213.102/PWB3 rsync: read error: Connection aborted rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/tmp/rsync-2.6.0/io.c(201) And this is server's configuration file: #PWB1 - Rsync.conf file #These are the Global options for this server #[GLOBAL OPTIONS] #Message for any client connecting motd file = /var/rsync.motd #Log file for this server log file = /var/rsync.pwb1.log #Only the 2 other servers should be able to connect hosts allow = 192.168.213.101 192.168.213.102 #Log everything transfer logging = yes #The format of the log file #Format is : #time [pid] op remote_host [remote_ip] module (user) file length bytes_sent checksum log format = %o %h [%a] %m (%u) %f %l %b %c #No timeout timeout = 0 #No directory listing list = no #This is module that can sync'ed against [PWB1] #PATH to the module path = /cygdrive/d/BILLS_CMS #Comment comment = Bills Office Repository Is there some error in the way the server is setup, so that the client aborts, or is this a bug? Thanks -- Darragh Sherwin OpenOffice.org Developer for Propylon http://www.propylon.com +353-1-4927456 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Darragh Sherwin OpenOffice.org Developer for Propylon http://www.propylon.com +353-1-4927456 -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
RSYNC and Cygwin: @ERROR auth failed on module
Hello, I'm a student trying to get rsync working correctly on my WinXP machine. My rsync server works perfectly through cygwin. BUT, when I try to add authentication, I get the message: @ERROR auth failed on module Mobilesync rsync connection unexpectedly closed (94 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at tmp/rsync-2.5.6/io.c(165) This is the command which causes the message: rsync -Ppvtl rsync://[EMAIL PROTECTED]/Mobilesync/Test1.txt . (i get the same error even without the mobile@ This is my rsyncd.conf: *** use chroot = false strict modes = false [Mobilesync] path = /cygdrive/c/cygwin/var/mobilesync comment = Mobilesync Test Directory read only = false auth users = mobile secrets file = /etc/rsyncd.secrets * and my rsyncd.secrets: mobile:sync I've tried all the suggestions posted to others in usegroups. Nothing works. Suggestions? THANKS, Anuja Doshi -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Rsync in cygwin as service --bwlimit=Ignored
I am running Rsync as a service under windows2000 The --bwlimit option causes cygrunsrv service to fail if included during setup of the service: $ cygrunsrv -I RSYNC -p /usr/bin/rsync.exe -a '--config=/etc/rsyncd.conf --daemon --bwlimit=64' $ cygrunsrv -S rsync cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. But without the option it works: $ cygrunsrv -I RSYNC -p /usr/bin/rsync.exe -a '--config=/etc/rsyncd.conf --daemon --no-detach' $ cygrunsrv -S rsync $ cygrunsrv -Q rsync Service rsync exists Type: Own Process Current State : Running Controls Accepted : Accept Stop Also, the --bwlimit option seems to be ignored under windows. $ rsync -v ./* berowneo::temp --bwlimit=64 BEPLog.txt Ossize.txt SwitchBEPServer.Log VerifydbResultsPostProcess.txt VerifydbResultsPreProcess.txt wrote 608 bytes read 462 bytes 2140.00 bytes/sec total size is 38419 speedup is 35.91 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~/bep/log $ rsync -v ./* berowneo::temp --bwlimit=6400 BEPLog.txt Ossize.txt SwitchBEPServer.Log VerifydbResultsPostProcess.txt VerifydbResultsPreProcess.txt wrote 610 bytes read 462 bytes 2144.00 bytes/sec total size is 38419 speedup is 35.84 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ~/bep/log $ rsync -v ./* berowneo::temp --bwlimit=6 BEPLog.txt Ossize.txt SwitchBEPServer.Log VerifydbResultsPostProcess.txt VerifydbResultsPreProcess.txt wrote 607 bytes read 462 bytes 2138.00 bytes/sec total size is 38419 speedup is 35.94 Thanks. Berowne Hlavaty Technical Consultant Barra International Ltd +61-2-9220-9303 [EMAIL PROTECTED] -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync on cygwin is hanging
On Sat, Jul 19, 2003 at 04:06:54PM -0400, Jeff Hedlund wrote: I am trying to backup a Windows machine to a Linux machine using rsync (over ssh). I have been able to successfully sync a few files at a time, but when I try to backup an entire tree the process hangs on both machines. I believe this is a different problem than one posted on here before, but I did try this patch with no success: http://www.mail-archive.com/[EMAIL PROTECTED]/msg07525.html When I try to rsync a tree, it will usually create a partial directory structure and download a few files and then hang. Linux: RH 7.3, rsync 2.5.6, OpenSSH_3.1p1 Cygwin: 5.0, rsync 2.5.6, OpenSSH_3.6.1p1 Let me know if more information is needed (and I apologize if too much is sent) :). I am running the following on the linux machine: rsync -vvrltDH --numeric-ids -pgo --stats --exclude-from=exclude.list --rsh=ssh [EMAIL PROTECTED]:c:/WINNT/ tree It looks like the rsync server on cygwin is failing to return from a write to stdout. I know (from prior offline discussion) you are using ssh key based command restriction via a wrapper script on the linux rsync servers. Are you using a ssh key based command restriction here as well? You don't mention that anywhere in this email. If you are running rsync via a wrapper script does the script exec the rsync command or run it as a child process? I trimmed the traces a bit to better reflect suitable inlining. You have a bad problem with linewrap messing up the traces. See my comments below and the cygwin annotations. This is the first time i've seen a cygwin strace. Interesting. Here is the tail end of the output from that command where it hangs: --- rsync.out --- system32/wbem/mof/ system32/wbem/mof/bad/ system32/wbem/mof/good/ system32/wins/ twain_32/ twain_32/fjscan/ twain_32/fjscan/fcpa/ twain_32/logiscan/ twain_32/miitwain/ wudnld20.tmp/ --- eof: rsync.out --- Here is the strace on the linux machine where it hangs: --- strace.out (on linux machine) --- [snip] lstat64(winrep.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(wudnld20.tmp, 0xba20) = -1 ENOENT (No such file or directory) mkdir(wudnld20.tmp, 040700) = 0 lstat64(wudnld20.tmp, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 time(NULL) = 1058644307 utime(wudnld20.tmp, [2003/07/19-15:51:47, 2002/01/25-01:17:08]) = 0 lchown32(0x8074940, 0x220, 0x201) = 0 write(1, wudnld20.tmp/\n, 14) = 14 select(8, [7], [4], NULL, {60, 0}) = 1 (out [4], left {60, 0}) write(4, \274\2\0\0\0\0\0\0\202\36\0\0\0\0\0\0\274\2\0\0\0\0\0\0..., 3916) = 3916 select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0} --- eof: strace.out (on linux machine) --- Waiting for another process to send something. Here is the output of the child rsync process on the linux box: --- strace.out.3341 (child rsync on linux machine) --- [snip] select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, TNAME\3\0\0\0\20\1\0\22nameSpaceSeparator\3..., 4092) = 4092 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \374\17\0\7, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \0\0\0\0\0\20\3A\0y\0\2\0\4\0\0\0\4\0\1\3\'\0\1\0\0\0h..., 4092) = 4092 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \374\17\0\7, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, |\22\260\266\0\202*\20\266\0\264\266\0\202\23\2\f\266..., 4092) = 2662 select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout) select(6, [5], NULL, NULL, {60, 0} --- eof: strace.out.3341 (child rsync on linux machine --- Waiting for another process to send something. And finally, here is the tail end of the strace on the cygwin box: --- strace.out (on cygwin) --- [snip and cleaned up to fix line-wrap errors] start of write() 342 29382720 [main] rsync 2036 writev: writev (1, 0x226AC0, 1) 184 29382904 [main] rsync 2036 fhandler_base::write: binary write 222 29383126 [main] rsync 2036 fhandler_base::write: 4096 = write (0x226B30, 4 096) 193 29383319 [main] rsync 2036 writev: 4096 = write (1, 0x226AC0, 1), errno 0 completion of write() good to know what that looks like 217 29383536 [main] rsync 2036 cygwin_select: 2, 0x0, 0x226B00, 0x0, 0x226AF0 351 29383887
Re: rsync on cygwin is hanging
jw schultz wrote: It looks like the rsync server on cygwin is failing to return from a write to stdout. I know (from prior offline discussion) you are using ssh key based command restriction via a wrapper script on the linux rsync servers. Are you using a ssh key based command restriction here as well? You don't mention that anywhere in this email. I am using an authorized_key, but no command restriction on the windows server. If you are running rsync via a wrapper script does the script exec the rsync command or run it as a child process? No wrapper script. So rsync is a child of the ssh process. Ahh, write didn't complete. We have an i/o error outside of rsync. Where do I go from here? I did an strace of the cygwin ssh process on another rsync (same command), here are the last few lines: 238 1848347 [main] sshd 1668 peek_socket: considering handle 0x10 189 1848536 [main] sshd 1668 peek_socket: adding read fd_set /dev/tcp, fd 4 218 1848754 [main] sshd 1668 peek_socket: WINSOCK_SELECT returned 0 593 1849347 [main] sshd 1668 select_stuff::poll: returning 1 199 1849546 [main] sshd 1668 select_stuff::cleanup: calling cleanup routines 188 1849734 [main] sshd 1668 select_stuff::~select_stuff: deleting select records 662 1850396 [main] sshd 1668 set_process_mask: old mask = 0, new mask = 8 192 1850588 [main] sshd 1668 set_process_mask: old mask = 8, new mask = 0 200 1850788 [main] sshd 1668 writev: writev (7, 0x22F500, 1) 191 1850979 [main] sshd 1668 fhandler_base::write: binary write Thanks, Jeff -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync on cygwin is hanging
I am trying to backup a Windows machine to a Linux machine using rsync (over ssh). I have been able to successfully sync a few files at a time, but when I try to backup an entire tree the process hangs on both machines. I believe this is a different problem than one posted on here before, but I did try this patch with no success: http://www.mail-archive.com/[EMAIL PROTECTED]/msg07525.html When I try to rsync a tree, it will usually create a partial directory structure and download a few files and then hang. Linux: RH 7.3, rsync 2.5.6, OpenSSH_3.1p1 Cygwin: 5.0, rsync 2.5.6, OpenSSH_3.6.1p1 Let me know if more information is needed (and I apologize if too much is sent) :). I am running the following on the linux machine: rsync -vvrltDH --numeric-ids -pgo --stats --exclude-from=exclude.list --rsh=ssh [EMAIL PROTECTED]:c:/WINNT/ tree Here is the tail end of the output from that command where it hangs: --- rsync.out --- system32/wbem/mof/ system32/wbem/mof/bad/ system32/wbem/mof/good/ system32/wins/ twain_32/ twain_32/fjscan/ twain_32/fjscan/fcpa/ twain_32/logiscan/ twain_32/miitwain/ wudnld20.tmp/ --- eof: rsync.out --- Here is the strace on the linux machine where it hangs: --- strace.out (on linux machine) --- lstat64(twunk_16.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(twunk_32.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(upwizun.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(vb.ini, 0xba20) = -1 ENOENT (No such file or directory) lstat64(vbaddin.ini, 0xba20) = -1 ENOENT (No such file or directory) lstat64(vmmreg32.dll, 0xba20) = -1 ENOENT (No such file or directory) lstat64(welcome.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(welcome.ini, 0xba20) = -1 ENOENT (No such file or directory) lstat64(win.ini, 0xba20) = -1 ENOENT (No such file or directory) lstat64(winhelp.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(winhlp32.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(winnt.bmp, 0xba20)= -1 ENOENT (No such file or directory) lstat64(winnt256.bmp, 0xba20) = -1 ENOENT (No such file or directory) lstat64(winrep.exe, 0xba20) = -1 ENOENT (No such file or directory) lstat64(wudnld20.tmp, 0xba20) = -1 ENOENT (No such file or directory) mkdir(wudnld20.tmp, 040700) = 0 lstat64(wudnld20.tmp, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 time(NULL) = 1058644307 utime(wudnld20.tmp, [2003/07/19-15:51:47, 2002/01/25-01:17:08]) = 0 lchown32(0x8074940, 0x220, 0x201) = 0 write(1, wudnld20.tmp/\n, 14) = 14 select(8, [7], [4], NULL, {60, 0}) = 1 (out [4], left {60, 0}) write(4, \274\2\0\0\0\0\0\0\202\36\0\0\0\0\0\0\274\2\0\0\0\0\0\0..., 3916) = 3916 select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout) select(8, [3 7], NULL, NULL, {60, 0} --- eof: strace.out (on linux machine) --- Here is the output of the child rsync process on the linux box: --- strace.out.3341 (child rsync on linux machine) --- close(3)= 0 close(7)= 0 close(4)= 0 fcntl64(8, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \374\17\0\7, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \1\0\0\0, 4) = 4 open($NtServicePackUninstall$/2jl3vz7j.zip, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) gettimeofday({1058644307, 137041}, NULL) = 0 getpid()= 3341 open($NtServicePackUninstall$/.2jl3vz7j.zip.dt2mgM, O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3 fchmod(3, 0700) = 0 write(1, $NtServicePackUninstall$/2jl3vz7..., 38) = 38 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \0\0\0\0, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \274\2\0\0, 4)= 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \0\0\0\0, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \315*\0\0, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, PK\3\4\n\0\0\0\0\0\363i\374\:7\213U\367\0\0\0\367\0\0..., 4072) = 4072 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \374\17\0\7, 4) = 4 select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) read(5, \0\0\0\4\0\0\0\0\0\6\0\0\0
Re: rsync/jscript/cygwin problem
Thanks for the suggestion. The problem occurs whether machines have static or dynamic (DHCP) IP addresses. Also, this problem only ever occurs when rsync is running (the first few minutes of a user login when conditions are met) - never during normal use (e.g. user with IE open etc). Any other ideas - bit stuck :) PP --- lackluster lackluster [EMAIL PROTECTED] wrote: XP sucks and has this problem. Try putting the following into a script (you may want to cron this hourly) @echo off ipconfig /release ipconfig /renew __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync/jscript/cygwin problem
I'm using a javascript program to execute rsync 2.5.6 compiled with cygwin on Windows XP Pro machines. These backup the user's My Documents folder to a Linux server running rsync 2.5.6 in daemon mode when the user logs in to XP and certain conditions are met (e.g. user hasn't backed up for a few days, user on the network etc). This works great except every now and then machine will lose network connectivity. TCP/IP communications completely goes although an IP address is still assigned. Only a reboot seems to sort this out. On all occasions the rsync backup is running when this happens (again this doesn't happen every user log in so unlikely to be co-incidence). The script log output is as follows: --- User jbloggs on PC_NAME at 08:50:49 26/06/2003 using Rsync Data Backup System version 1.12 rsync cmd: C:\software files\software\rsync.exe -czr --stats /cygdrive/d/Documents and Settings/jbloggs/My Documents/ 192.168.1.2::RsyncBackup/laptop/jbloggs-PC_NAME stdOut was: stdErr was: rsync: read error: Connection reset by peer rsync error: error in rsync protocol data stream (code 12) at io.c(177) rsync return code was: 12 Duration was 59.425 seconds The server log at this time is: 2003/06/26 08:49:51 [30315] rsync: name lookup failed for 192.168.1.3: Name or service not known 2003/06/26 08:49:51 [30315] rsync to RsyncBackup/laptop/jbloggs-PC_NAME from unknown (192.168.1.3) 2003/06/26 08:50:24 [30366] recv unknown [192.168.1.3] RsyncBackup () Account Control 2003/some groovy 2003.xls 97280 2003/06/26 09:00:24 [30315] rsync error: timeout in data send/receive (code 30) at io.c(103) 2003/06/26 09:00:24 [30315] rsync: connection unexpectedly closed (7638 bytes read so far) 2003/06/26 09:00:24 [30315] rsync error: error in rsync protocol data stream (code 12) at io.c(165) I really need this system to be reliable as it could end up on a few hundred machines. Quite happy to accept its all my fault but would welcome suggestions :) Would the options -czr --stats cause a problem? I'm running this under windows scripting host so maybe I'll also post to a group examining that angle. Thanks in advance for any help PP __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync/jscript/cygwin problem
XP sucks and has this problem. Try putting the following into a script (you may want to cron this hourly) @echo off ipconfig /release ipconfig /renew Original Message Follows From: peter pan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: rsync/jscript/cygwin problem Date: Sat, 28 Jun 2003 14:55:03 -0700 (PDT) MIME-Version: 1.0 Received: from lists.samba.org ([66.70.73.150]) by mc10-f12.bay6.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sat, 28 Jun 2003 14:55:36 -0700 Received: from dp.samba.org (localhost [127.0.0.1])by lists.samba.org (Postfix) with ESMTP id 77B742C208for [EMAIL PROTECTED]; Sat, 28 Jun 2003 21:55:36 + (GMT) Received: from web13309.mail.yahoo.com (web13309.mail.yahoo.com[216.136.175.192])by lists.samba.org (Postfix) with SMTP id 2F3642C0A5for [EMAIL PROTECTED]; Sat, 28 Jun 2003 21:55:04 + (GMT) Received: from [62.253.32.5] by web13309.mail.yahoo.com via HTTP;Sat, 28 Jun 2003 14:55:03 PDT X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP Delivered-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Spam-Status: No, hits=0.0 required=5.0tests=noneversion=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-BeenThere: [EMAIL PROTECTED] X-Mailman-Version: 2.1.2 Precedence: list List-Id: rsync user list rsync.lists.samba.org List-Unsubscribe: http://lists.samba.org/mailman/listinfo/rsync,mailto:[EMAIL PROTECTED] List-Archive: http://lists.samba.org/pipermail/rsync List-Post: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Subscribe: http://lists.samba.org/mailman/listinfo/rsync,mailto:[EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Errors-To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 28 Jun 2003 21:55:36.0991 (UTC) FILETIME=[01CFB2F0:01C33DC0] I'm using a javascript program to execute rsync 2.5.6 compiled with cygwin on Windows XP Pro machines. These backup the user's My Documents folder to a Linux server running rsync 2.5.6 in daemon mode when the user logs in to XP and certain conditions are met (e.g. user hasn't backed up for a few days, user on the network etc). This works great except every now and then machine will lose network connectivity. TCP/IP communications completely goes although an IP address is still assigned. Only a reboot seems to sort this out. On all occasions the rsync backup is running when this happens (again this doesn't happen every user log in so unlikely to be co-incidence). The script log output is as follows: --- User jbloggs on PC_NAME at 08:50:49 26/06/2003 using Rsync Data Backup System version 1.12 rsync cmd: C:\software files\software\rsync.exe -czr --stats /cygdrive/d/Documents and Settings/jbloggs/My Documents/ 192.168.1.2::RsyncBackup/laptop/jbloggs-PC_NAME stdOut was: stdErr was: rsync: read error: Connection reset by peer rsync error: error in rsync protocol data stream (code 12) at io.c(177) rsync return code was: 12 Duration was 59.425 seconds The server log at this time is: 2003/06/26 08:49:51 [30315] rsync: name lookup failed for 192.168.1.3: Name or service not known 2003/06/26 08:49:51 [30315] rsync to RsyncBackup/laptop/jbloggs-PC_NAME from unknown (192.168.1.3) 2003/06/26 08:50:24 [30366] recv unknown [192.168.1.3] RsyncBackup () Account Control 2003/some groovy 2003.xls 97280 2003/06/26 09:00:24 [30315] rsync error: timeout in data send/receive (code 30) at io.c(103) 2003/06/26 09:00:24 [30315] rsync: connection unexpectedly closed (7638 bytes read so far) 2003/06/26 09:00:24 [30315] rsync error: error in rsync protocol data stream (code 12) at io.c(165) I really need this system to be reliable as it could end up on a few hundred machines. Quite happy to accept its all my fault but would welcome suggestions :) Would the options -czr --stats cause a problem? I'm running this under windows scripting host so maybe I'll also post to a group examining that angle. Thanks in advance for any help PP __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync and cygwin
I had sent a message to the list earlier this week detailing an error message I am getting using rsync on Cygwin on Windows 2000. I have now duplicated the problem on another windows 2000 server. I have a third server on which the process works, so I don't really know what is going wrong. All three servers are rsyncing to the same Linux server. Below is the original question. Any help would be appreciated. The error is this: Invalid file index some number (count=some number) rsync error: protocol incompatibility (code 2) at sender.c (135) The command line I'm using to start this is: c:\cygwin\bin\rsync -aR -e c\cygwin\bin\ssh.exe -v --numeric-ids --exclude-from=/cydrive/c/ssh/rsync-ex cludes.txt --dry-run --delete --delete-after /cygdrive/c root at backupserver:/ rsync-excludes.txt contains things like: -PEACHW/ -WINPOINT/ -PNTDATA/ : : At first I thought that maybe my file list was getting too long, but I changed my excludes so that I had a file list that I knew was short enough and I still get the error. I get the error on different files depending on what I have excluded, but if I run the same command twice, I get the error in the exact same spot. Thanks in advance for any help. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
HmmThis backup server is handling backup jobs from about a dozen other machines -- all but three are Linux. The other three are Windows 2000 servers running Cygwin. Two of those are not working (giving the error). The backup machine has other duties, too, and has not had any issues. The uptime is great, and the performance has been fine. One other thing that might be important: This error happens *JUST* after building the file list. It is like the transfer doesn't work at all. It errors immediately as the transfer starts. Trey Nolen The error is this: Invalid file index some number (count=some number) rsync error: protocol incompatibility (code 2) at sender.c (135) That error indicates something is seriously wrong at the communications level. Given an ssh over TCP connection i'd rule out the network layer. That leaves internal data corruption. I'd start by questioning the integrety of the common point of failure--the backup server. Check the logs for errors, run memtest, etc. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
On Sat, Jun 07, 2003 at 05:36:03PM -0500, Trey Nolen wrote: HmmThis backup server is handling backup jobs from about a dozen other machines -- all but three are Linux. The other three are Windows 2000 servers running Cygwin. Two of those are not working (giving the error). The backup machine has other duties, too, and has not had any issues. The uptime is great, and the performance has been fine. OK. Now we get a fuller picture. All i knew before was you had one Linux box and three W2K cygwin boxes. That means we have 2/3 of cygwin boxes having the problem but not the Linux boxes. One other thing that might be important: This error happens *JUST* after building the file list. It is like the transfer doesn't work at all. It errors immediately as the transfer starts. Trey Nolen The error is this: Invalid file index some number (count=some number) Rsync uses the index number of the file list array to identify files. This message is comes from the sender. The first number is the file number that was requested by the receiver, the second is the total number of files in the index. For the sender to get a request for a file number not in the list indicates serious corruption somewhere. My next step would be to examine the binaries on cygwin, rsync and ssh. Try checksumming them for a difference between the badly behaving machines and the still OK one. I'd then consider that the cygwin binaries might have been built incorrectly. After that, i don't know, perhaps creeping corruption on the two machines? rsync error: protocol incompatibility (code 2) at sender.c (135) That error indicates something is seriously wrong at the communications level. Given an ssh over TCP connection i'd rule out the network layer. That leaves internal data corruption. I'd start by questioning the integrety of the common point of failure--the backup server. Check the logs for errors, run memtest, etc. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jw schultz wrote: I'd then consider that the cygwin binaries might have been built incorrectly. After that, i don't know, perhaps creeping corruption on the two machines? BTW: those are my latest builds or rsync/cygwin: $ md5sum /usr/bin/rsync.exe 60ee6b728e94c3dde4b5da0274057b7e */usr/bin/rsync.exe $ sha1sum /usr/bin/rsync.exe d4afecddd974fbdddc3d4d152f8a0d8da942daf8 */usr/bin/rsync.exe $ rsync --version rsync version 2.5.6 protocol version 26 Copyright (C) 1996-2002 by Andrew Tridgell and others http://rsync.samba.org/ Capabilities: 32-bit files, socketpairs, hard links, symlinks, batchfiles, no IPv6, 32-bit system inums, 64-bit internal inums rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details. - -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -BEGIN PGP SIGNATURE- Version: PGP 8.0 - not licensed for commercial use: www.pgp.com iQA/AwUBPuJzWmiYgizI8lL7EQJFrgCgrBfEmfpOHdmM6BudrBb4ucvSjoYAnRQ7 1BCozzEfoknqAi/R1kN9P6YE =fqCd -END PGP SIGNATURE- -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
On Sat, Jun 07, 2003 at 05:36:03PM -0500, Trey Nolen wrote: HmmThis backup server is handling backup jobs from about a dozen other machines -- all but three are Linux. The other three are Windows 2000 servers running Cygwin. Two of those are not working (giving the error). The backup machine has other duties, too, and has not had any issues. The uptime is great, and the performance has been fine. Another thing to try is the --blocking-io or --no-blocking-io options. It's not too likely this will help (since some of your cygwin boxes work ok), but it is still worth a try. This was an issue on older Solaris versions because of problems with their ssh. I've also found rsync over ssh on cygwin is not fully reliable. On the other hand, rsyncd on cygwin has been highly reliable for me. So if all else fails you could run rsyncd as a WinXX service (assuming you initiate the connection from the backup server rather than the other way around). Craig -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jw schultz wrote: I'd then consider that the cygwin binaries might have been built incorrectly. After that, i don't know, perhaps creeping corruption on the two machines? BTW: those are my latest builds or rsync/cygwin: $ md5sum /usr/bin/rsync.exe 60ee6b728e94c3dde4b5da0274057b7e */usr/bin/rsync.exe $ sha1sum /usr/bin/rsync.exe d4afecddd974fbdddc3d4d152f8a0d8da942daf8 */usr/bin/rsync.exe $ rsync --version rsync version 2.5.6 protocol version 26 Copyright (C) 1996-2002 by Andrew Tridgell and others http://rsync.samba.org/ Capabilities: 32-bit files, socketpairs, hard links, symlinks, batchfiles, no IPv6, 32-bit system inums, 64-bit internal inums rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details. - -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -BEGIN PGP SIGNATURE- Version: PGP 8.0 - not licensed for commercial use: www.pgp.com iQA/AwUBPuJzWmiYgizI8lL7EQJFrgCgrBfEmfpOHdmM6BudrBb4ucvSjoYAnRQ7 1BCozzEfoknqAi/R1kN9P6YE =fqCd -END PGP SIGNATURE- -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync] Re: rsync and cygwin
I, too, tried it after it was mentioned and it worked for me as well. I think this is going to be my solution. I haven't got everything working yet, but will try to finish it up later today. I was able to successfully build a good file list from a regular CMD prompt, so I called it a night. :-) I thank everyone for their help! Trey Nolen Michael, While I frequently run scheduled bash shell scripts via a bash.bat file as you describe, I don't think it is necessary here... I think Trey can run rsync.exe directly if he really wants to. I tested running 'ls /cygdrive' from within a cmd.exe dos prompt and it worked... Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\c:\tools\cygwin\bin\ls /cygdrive/ c e f n s C:\c:\tools\cygwin\bin\ls /cygdrive/c AUTOEXEC.BATMSDOS.SYS (I'm assuming rsync would work similarly to ls) While I don't know the cygwin architecture details, it looks like the /cygdrive functionality is a part of cygwin.dll and can be used without a parent bash shell. Later, Bert --On Tuesday, June 03, 2003 8:45 PM -0500 Michael Hipp [EMAIL PROTECTED] wrote: Trey Nolen wrote: But can you do that if you are not running it from the Cygwin prompt? I didn't do that because we were starting it with the scheduler. Will that still work? Yes. Write a small 'myjob.bat' file with something like this in it: @echo off C: chdir C:\cygwin\bin bash --login -i -c ~/myscript.sh Use scheduler to run 'myjob.bat'. It will execute 'myscript.sh' under bash and from there you can do anything bash can do. Michael -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync] Re: rsync and cygwin
I, too, tried it after it was mentioned and it worked for me as well. I think this is going to be my solution. I haven't got everything working yet, but will try to finish it up later today. I was able to successfully build a good file list from a regular CMD prompt, so I called it a night. :-) I thank everyone for their help! Trey Nolen Michael, While I frequently run scheduled bash shell scripts via a bash.bat file as you describe, I don't think it is necessary here... I think Trey can run rsync.exe directly if he really wants to. I tested running 'ls /cygdrive' from within a cmd.exe dos prompt and it worked... Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\c:\tools\cygwin\bin\ls /cygdrive/ c e f n s C:\c:\tools\cygwin\bin\ls /cygdrive/c AUTOEXEC.BATMSDOS.SYS (I'm assuming rsync would work similarly to ls) While I don't know the cygwin architecture details, it looks like the /cygdrive functionality is a part of cygwin.dll and can be used without a parent bash shell. Later, Bert --On Tuesday, June 03, 2003 8:45 PM -0500 Michael Hipp [EMAIL PROTECTED] wrote: Trey Nolen wrote: But can you do that if you are not running it from the Cygwin prompt? I didn't do that because we were starting it with the scheduler. Will that still work? Yes. Write a small 'myjob.bat' file with something like this in it: @echo off C: chdir C:\cygwin\bin bash --login -i -c ~/myscript.sh Use scheduler to run 'myjob.bat'. It will execute 'myscript.sh' under bash and from there you can do anything bash can do. Michael -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync and cygwin part II
OK, I had emailed yesterday about an issue backing up a W2K machine using rsync under Cygwin. I was having trouble backing up the root directory, and I'm happy to say that the suggestion of using /cygdrive/c seems to have worked! Unfortunately, now I'm getting another error. The error is this: Invalid file index some number (count=some number) rsync error: protocol incompatibility (code 2) at sender.c (135) The command line I'm using to start this is: c:\cygwin\bin\rsync -aR -e c\cygwin\bin\ssh.exe -v --numeric-ids --exclude-from=/cydrive/c/ssh/rsync-ex cludes.txt --dry-run --delete --delete-after /cygdrive/c [EMAIL PROTECTED]:/ rsync-excludes.txt contains things like: -PEACHW/ -WINPOINT/ -PNTDATA/ : : At first I thought that maybe my file list was getting too long, but I changed my excludes so that I had a file list that I knew was short enough and I still get the error. I get the error on different files depending on what I have excluded, but if I run the same command twice, I get the error in the exact same spot. Thanks in advance for any help. Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync and cygwin paths
(cc to [EMAIL PROTECTED] so that people that knows ebtter what i'm talking about can eventually correct me) jw schultz wrote: Perhaps that is the document he needs. If not could you cygwinese, cygwinites, cygwinists, cygwinim or whatever point him to one that will clear up the slash/backslash issues that still haven't been addressed. Rsync does not recognise backslashes as such in exclude patterns. Path components are expected to be delimited by slashes (/) only. I expect the cygwin library translates as necessary. Basically if you want to be sure about what you mean you better never use \. I think the actual state is: cygwin's open() tries to do its best to open also path with \ but most of the times there are 'problems' (that are, of course, no 'problems' but its meant that way) in the code of the app. itself that block \ thinking they are shell escapes or anyway invalid paths... so that only a few application can be really used with windows paths. Avoiding them completely is the safest choiche. Please notice that there is a default prgoramm called cygpath that's really useful to convert path- and file-names between the two version, and it's not so hard to create wrapper scripts to convert them, e.g. (I copied this long ago from I-don't-remember-where): http://cygwin.com/cygwin-ug-net/using-utils.html#CYGPATH NEWARGS= for arg in $@ ; do if [ -e ${arg} ]; then NEWARGS=${NEWARGS} `cygpath -p -w $arg` else NEWARGS=${NEWARGS} $arg fi done -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin paths
On Wed, 4 Jun 2003, Lapo Luchini wrote: (cc to [EMAIL PROTECTED] so that people that knows ebtter what i'm talking about can eventually correct me) jw schultz wrote: Perhaps that is the document he needs. If not could you cygwinese, cygwinites, cygwinists, cygwinim or whatever point him to one that will clear up the slash/backslash issues that still haven't been addressed. Rsync does not recognise backslashes as such in exclude patterns. Path components are expected to be delimited by slashes (/) only. I expect the cygwin library translates as necessary. Basically if you want to be sure about what you mean you better never use \. I think the actual state is: cygwin's open() tries to do its best to open also path with \ but most of the times there are 'problems' (that are, of course, no 'problems' but its meant that way) in the code of the app. itself that block \ thinking they are shell escapes or anyway invalid paths... so that only a few application can be really used with windows paths. Avoiding them completely is the safest choiche. Please notice that there is a default prgoramm called cygpath that's really useful to convert path- and file-names between the two version, and it's not so hard to create wrapper scripts to convert them, e.g. (I copied this long ago from I-don't-remember-where): http://cygwin.com/cygwin-ug-net/using-utils.html#CYGPATH NEWARGS= for arg in $@ ; do if [ -e ${arg} ]; then NEWARGS=${NEWARGS} `cygpath -p -w $arg` else NEWARGS=${NEWARGS} $arg fi done Lapo, Note that the above won't work correctly if the program is expected to create the file with a given name... IMO, there is no way of writing a generic wrapper script without knowing anything about program parameters. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! I have since come to realize that being between your mentor and his route to the bathroom is a major career booster. -- Patrick Naughton -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync and cygwin
Hi, I'm having some trouble using rsync on W2K under Cygwin. We are using it to back up the W2K machine to a Linux machine. We are using the patched version of rsync 2.5.6 that allows it to run faster on NT/2K when calculating the changes. We can backup a directory without a problem, but in this case, we want to backup everything, so the directory we are backing up is \. We do not run rsync under a Cygwin bash prompt, and we schedule it with the scheduler to run automatically every night, but this issue is the same even if we run the commands manually. The following is the contents of a .bat file we are running with scheduler: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --exclude-from=c:\ssh\rsync-exclude.txt --nu meric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ I've also tried something like the following: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ In both cases, I get a lot of errors like the following: Building file list... readlink \/Borrower: No such file or directory readlink \/Data: No such file or directory : : IO error encountered - skipping file deletion It does one of the readlink lines for every file and directory in the root directory. Notice how it has a backslash and a forward slash on each line. It seems like rsync is not handling the removal of the slashes properly?? Now, if I do something like: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \Data [EMAIL PROTECTED]:/ It backs up the c:\Data directory just fine. Notice the only differenc here is that we are backing up \Data instead of just \. My rsync-exclude.txt file contains: + \Borrower + \Data : : for each directory and file in the root directory. It doesn't seem to matter what we list in the exclude file because the errors still list every file in the root directory no matter what we have in the exclude file. I've looked through the archives, and found some similar issues, like the one found here: http://lists.samba.org/pipermail/rsync/2003-March/010247.html but I haven't been able to resolve this so far. Can anyone shed some light on this for me? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
If we do that, it backs up the cygwin directory (c:\cygwin being the root of the cygwin install) and not the root of c: (i.e. C:\ ). Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:13 PM Subject: Re: rsync and cygwin Try using slash instead of backslash. On Tue, Jun 03, 2003 at 06:04:50PM -0500, Trey Nolen wrote: Hi, I'm having some trouble using rsync on W2K under Cygwin. We are using it to back up the W2K machine to a Linux machine. We are using the patched version of rsync 2.5.6 that allows it to run faster on NT/2K when calculating the changes. We can backup a directory without a problem, but in this case, we want to backup everything, so the directory we are backing up is \. We do not run rsync under a Cygwin bash prompt, and we schedule it with the scheduler to run automatically every night, but this issue is the same even if we run the commands manually. The following is the contents of a .bat file we are running with scheduler: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --exclude-from=c:\ssh\rsync-exclude.txt --nu meric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ I've also tried something like the following: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ In both cases, I get a lot of errors like the following: Building file list... readlink \/Borrower: No such file or directory readlink \/Data: No such file or directory : : IO error encountered - skipping file deletion It does one of the readlink lines for every file and directory in the root directory. Notice how it has a backslash and a forward slash on each line. It seems like rsync is not handling the removal of the slashes properly?? Now, if I do something like: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \Data [EMAIL PROTECTED]:/ It backs up the c:\Data directory just fine. Notice the only differenc here is that we are backing up \Data instead of just \. My rsync-exclude.txt file contains: + \Borrower + \Data : : for each directory and file in the root directory. It doesn't seem to matter what we list in the exclude file because the errors still list every file in the root directory no matter what we have in the exclude file. I've looked through the archives, and found some similar issues, like the one found here: http://lists.samba.org/pipermail/rsync/2003-March/010247.html but I haven't been able to resolve this so far. Can anyone shed some light on this for me? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
On Tue, Jun 03, 2003 at 06:34:42PM -0500, Trey Nolen wrote: If we do that, it backs up the cygwin directory (c:\cygwin being the root of the cygwin install) and not the root of c: (i.e. C:\ ). I was refering to the exclude list, not the command line. In any case -vv will show you what patterns do match. Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:13 PM Subject: Re: rsync and cygwin Try using slash instead of backslash. On Tue, Jun 03, 2003 at 06:04:50PM -0500, Trey Nolen wrote: Hi, I'm having some trouble using rsync on W2K under Cygwin. We are using it to back up the W2K machine to a Linux machine. We are using the patched version of rsync 2.5.6 that allows it to run faster on NT/2K when calculating the changes. We can backup a directory without a problem, but in this case, we want to backup everything, so the directory we are backing up is \. We do not run rsync under a Cygwin bash prompt, and we schedule it with the scheduler to run automatically every night, but this issue is the same even if we run the commands manually. The following is the contents of a .bat file we are running with scheduler: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --exclude-from=c:\ssh\rsync-exclude.txt --nu meric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ I've also tried something like the following: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ In both cases, I get a lot of errors like the following: Building file list... readlink \/Borrower: No such file or directory readlink \/Data: No such file or directory : : IO error encountered - skipping file deletion It does one of the readlink lines for every file and directory in the root directory. Notice how it has a backslash and a forward slash on each line. It seems like rsync is not handling the removal of the slashes properly?? Now, if I do something like: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \Data [EMAIL PROTECTED]:/ It backs up the c:\Data directory just fine. Notice the only differenc here is that we are backing up \Data instead of just \. My rsync-exclude.txt file contains: + \Borrower + \Data : : for each directory and file in the root directory. It doesn't seem to matter what we list in the exclude file because the errors still list every file in the root directory no matter what we have in the exclude file. I've looked through the archives, and found some similar issues, like the one found here: http://lists.samba.org/pipermail/rsync/2003-March/010247.html but I haven't been able to resolve this so far. Can anyone shed some light on this for me? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
OK, sorry about that. When I do that, I get: building file list ... excluding directory / because of pattern /* done total: matches=0 tag_hits=0 false_alarms=0 data=0 Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:44 PM Subject: Re: rsync and cygwin On Tue, Jun 03, 2003 at 06:34:42PM -0500, Trey Nolen wrote: If we do that, it backs up the cygwin directory (c:\cygwin being the root of the cygwin install) and not the root of c: (i.e. C:\ ). I was refering to the exclude list, not the command line. In any case -vv will show you what patterns do match. Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:13 PM Subject: Re: rsync and cygwin Try using slash instead of backslash. On Tue, Jun 03, 2003 at 06:04:50PM -0500, Trey Nolen wrote: Hi, I'm having some trouble using rsync on W2K under Cygwin. We are using it to back up the W2K machine to a Linux machine. We are using the patched version of rsync 2.5.6 that allows it to run faster on NT/2K when calculating the changes. We can backup a directory without a problem, but in this case, we want to backup everything, so the directory we are backing up is \. We do not run rsync under a Cygwin bash prompt, and we schedule it with the scheduler to run automatically every night, but this issue is the same even if we run the commands manually. The following is the contents of a .bat file we are running with scheduler: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --exclude-from=c:\ssh\rsync-exclude.txt --nu meric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ I've also tried something like the following: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ In both cases, I get a lot of errors like the following: Building file list... readlink \/Borrower: No such file or directory readlink \/Data: No such file or directory : : IO error encountered - skipping file deletion It does one of the readlink lines for every file and directory in the root directory. Notice how it has a backslash and a forward slash on each line. It seems like rsync is not handling the removal of the slashes properly?? Now, if I do something like: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \Data [EMAIL PROTECTED]:/ It backs up the c:\Data directory just fine. Notice the only differenc here is that we are backing up \Data instead of just \. My rsync-exclude.txt file contains: + \Borrower + \Data : : for each directory and file in the root directory. It doesn't seem to matter what we list in the exclude file because the errors still list every file in the root directory no matter what we have in the exclude file. I've looked through the archives, and found some similar issues, like the one found here: http://lists.samba.org/pipermail/rsync/2003-March/010247.html but I haven't been able to resolve this so far. Can anyone shed some light on this for me? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and cygwin
That is with a - /* at the end of the excludes file (I was trying to exclude everything else). But, when that is removed, it matches everything under the cygwin directory (again matching cygwin's root as / ) and doesn't see the rest of our data. Trey Nolen OK, sorry about that. When I do that, I get: building file list ... excluding directory / because of pattern /* done total: matches=0 tag_hits=0 false_alarms=0 data=0 Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:44 PM Subject: Re: rsync and cygwin On Tue, Jun 03, 2003 at 06:34:42PM -0500, Trey Nolen wrote: If we do that, it backs up the cygwin directory (c:\cygwin being the root of the cygwin install) and not the root of c: (i.e. C:\ ). I was refering to the exclude list, not the command line. In any case -vv will show you what patterns do match. Trey Nolen - Original Message - From: jw schultz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:13 PM Subject: Re: rsync and cygwin Try using slash instead of backslash. On Tue, Jun 03, 2003 at 06:04:50PM -0500, Trey Nolen wrote: Hi, I'm having some trouble using rsync on W2K under Cygwin. We are using it to back up the W2K machine to a Linux machine. We are using the patched version of rsync 2.5.6 that allows it to run faster on NT/2K when calculating the changes. We can backup a directory without a problem, but in this case, we want to backup everything, so the directory we are backing up is \. We do not run rsync under a Cygwin bash prompt, and we schedule it with the scheduler to run automatically every night, but this issue is the same even if we run the commands manually. The following is the contents of a .bat file we are running with scheduler: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --exclude-from=c:\ssh\rsync-exclude.txt --nu meric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ I've also tried something like the following: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \ [EMAIL PROTECTED]:/ In both cases, I get a lot of errors like the following: Building file list... readlink \/Borrower: No such file or directory readlink \/Data: No such file or directory : : IO error encountered - skipping file deletion It does one of the readlink lines for every file and directory in the root directory. Notice how it has a backslash and a forward slash on each line. It seems like rsync is not handling the removal of the slashes properly?? Now, if I do something like: c:\cygwin\bin\rsync -aR -e c:\cygwin\bin\ssh.exe --verbose --numeric-ids --delete --delete-after \Data [EMAIL PROTECTED]:/ It backs up the c:\Data directory just fine. Notice the only differenc here is that we are backing up \Data instead of just \. My rsync-exclude.txt file contains: + \Borrower + \Data : : for each directory and file in the root directory. It doesn't seem to matter what we list in the exclude file because the errors still list every file in the root directory no matter what we have in the exclude file. I've looked through the archives, and found some similar issues, like the one found here: http://lists.samba.org/pipermail/rsync/2003-March/010247.html but I haven't been able to resolve this so far. Can anyone shed some light on this for me? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before
Re: [rsync@b] Re: rsync and cygwin
I think that a key part of the answer is to use /cygdrive/c instead of / or \ to identify c:\ in a cygwin environment. But can you do that if you are not running it from the Cygwin prompt? I didn't do that because we were starting it with the scheduler. Will that still work? Trey Nolen -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync@b] Re: rsync and cygwin
Trey Nolen wrote: But can you do that if you are not running it from the Cygwin prompt? I didn't do that because we were starting it with the scheduler. Will that still work? Yes. Write a small 'myjob.bat' file with something like this in it: @echo off C: chdir C:\cygwin\bin bash --login -i -c ~/myscript.sh Use scheduler to run 'myjob.bat'. It will execute 'myscript.sh' under bash and from there you can do anything bash can do. Michael -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync@b] Re: rsync and cygwin
Michael, While I frequently run scheduled bash shell scripts via a bash.bat file as you describe, I don't think it is necessary here... I think Trey can run rsync.exe directly if he really wants to. I tested running 'ls /cygdrive' from within a cmd.exe dos prompt and it worked... Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\c:\tools\cygwin\bin\ls /cygdrive/ c e f n s C:\c:\tools\cygwin\bin\ls /cygdrive/c AUTOEXEC.BATMSDOS.SYS (I'm assuming rsync would work similarly to ls) While I don't know the cygwin architecture details, it looks like the /cygdrive functionality is a part of cygwin.dll and can be used without a parent bash shell. Later, Bert --On Tuesday, June 03, 2003 8:45 PM -0500 Michael Hipp [EMAIL PROTECTED] wrote: Trey Nolen wrote: But can you do that if you are not running it from the Cygwin prompt? I didn't do that because we were starting it with the scheduler. Will that still work? Yes. Write a small 'myjob.bat' file with something like this in it: @echo off C: chdir C:\cygwin\bin bash --login -i -c ~/myscript.sh Use scheduler to run 'myjob.bat'. It will execute 'myscript.sh' under bash and from there you can do anything bash can do. Michael -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync@b] Re: rsync and cygwin
Bert wrote: While I don't know the cygwin architecture details, it looks like the /cygdrive functionality is a part of cygwin.dll and can be used without a parent bash shell. It is part of it's POSIX-layerness, indeed, and it's storen in the registry, so it needs no startup script to set it up: http://cygwin.com/cygwin-ug-net/using.html#MOUNT-TABLE The mapping is stored in the current user's Cygwin /mount table/ in the Windows registry so that the information will be retrieved next time the user logs in. Because it is sometimes desirable to have system-wide as well as user-specific mounts, there is also a system-wide mount table that all Cygwin users inherit. The system-wide table may only be modified by a user with the appropriate priviledges (Administrator priviledges in Windows NT). -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: [rsync@b] Re: rsync and cygwin
On Wed, Jun 04, 2003 at 10:50:18AM +0200, Lapo Luchini wrote: Bert wrote: While I don't know the cygwin architecture details, it looks like the /cygdrive functionality is a part of cygwin.dll and can be used without a parent bash shell. It is part of it's POSIX-layerness, indeed, and it's storen in the registry, so it needs no startup script to set it up: http://cygwin.com/cygwin-ug-net/using.html#MOUNT-TABLE Perhaps that is the document he needs. If not could you cygwinese, cygwinites, cygwinists, cygwinim or whatever point him to one that will clear up the slash/backslash issues that still haven't been addressed. Rsync does not recognise backslashes as such in exclude patterns. Path components are expected to be delimited by slashes (/) only. I expect the cygwin library translates as necessary. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Rsync / SSH / Cygwin .. permission problems..
Cygwin is installed on both systems and works perfectly. OpenSSH is installed and running, and the rsync user we created is able to ssh using password-less keys between the 2 systems. When I run rsync, it correctly pulls the data down that I want. The problem is that there are NO permissions on the files that are pulled down, so they are basically inaccessable. I had to set cygwin=nontsec for my rsync service for the cron jobs to work correctly between 2 win2k servers (both ntfs, I set it up a while back now though.) Otherwise the files were owned by SYSTEM if i remember rightly, and needed to be chowned/chmodded before they were any use. With nontsec they just inherited the directories permissions. Havent tried over ssh though. I was using rsync in server mode as a service. I have tried with and without the -p option, hoping the files would inherit parent directory permissions if I didn't use it, but it doesn't appear to do so. The command as I run it is; rsync -rlztpv --rsh=ssh --delete remote-fs:/path/to/the/files . or rsync -rlztv --rsh=ssh --delete remote-fs:/path/to/the/files . With the p option included, there are no permission bits set on the files whatsover. Without the p option, it sets the files to 0200. Any ideas here? Both systems have the Domain groups in the groups file, and have the rsync user as well as local users in the passwd file. I would prefer to not have to have ALL domain users in the password file for cygwin if possible. I have also tried this from a DOS shell instead of a cygwin shell with the same results.. Thanks in advance... Are the files on NTFS? Can you give some more detail about the CygWin installation? Whetherver you use ntsec, release number of cygwin and rsync... (to include al this you can attach the output of 'cygcheck -s') BTW: latest packages are cygwin-1.3.22-1 (which afair defaults to ntsec) and rsync-2.5.6-1 -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
RE: Rsync / SSH / Cygwin .. permission problems..
The files are all on NTFS. Cygwin was installed using setup version 2.340.2.5 Rsync 2.5.6 OpenSSH 3.6.1p1 Cygwin 1.3.22-1 It also appears that the CYGWIN variable is non-existant or empty when I start up cygwin as well. I will try nontsec and ntsec to see if that helps at all. From cygcheck -s ; Cygwin Win95/NT Configuration Diagnostics Current System Time: Mon Jun 02 08:49:23 2003 Windows 2000 Server Ver 5.0 Build 2195 Service Pack 3 Path: C:\cygwin\usr\local\bin C:\cygwin\bin C:\cygwin\bin c:\WINNT\system32 c:\WINNT c:\WINNT\System32\Wbem c:\Program Files\nsr\bin C:\cygwin\bin\id.exe output (nontsec) UID: 14180(rsync) GID: 10513(Domain groups=10513(Domain Users) C:\cygwin\bin\id.exe output (ntsec) UID: 14180(rsync)GID: 10513(Domain groups=545(Users)10513(Domain Users) SysDir: C:\WINNT\System32 WinDir: C:\WINNT HOME = `C:\cygwin\export\home\rsync' MAKE_MODE = `unix' PWD = `/usr/bin' USER = `rsync' Use `-r' to scan registry a: fd N/AN/A c: hd NTFS 17312Mb 12% CP CS UN PA FC LOCAL d: cd N/AN/A e: hd NTFS 104995Mb 37% CP CS UN PA FC File f: hd NTFS 35040Mb 43% CP CS UN PA FC User C:\cygwin / system binmode C:\cygwin/bin /usr/bin system binmode C:\cygwin/lib /usr/lib system binmode . /cygdrive system binmode,cygdrive Found: .\awk.exe Found: C:\cygwin\bin\awk.exe Found: .\bash.exe Found: C:\cygwin\bin\bash.exe Found: .\cat.exe Found: C:\cygwin\bin\cat.exe Found: .\cp.exe Found: C:\cygwin\bin\cp.exe Not Found: cpp (good!) Found: .\find.exe Found: C:\cygwin\bin\find.exe Not Found: gcc Not Found: gdb Found: .\grep.exe Found: C:\cygwin\bin\grep.exe Not Found: ld Found: .\ls.exe Found: C:\cygwin\bin\ls.exe Not Found: make Found: .\mv.exe Found: C:\cygwin\bin\mv.exe Found: .\rm.exe Found: C:\cygwin\bin\rm.exe Found: .\sed.exe Found: C:\cygwin\bin\sed.exe Found: .\sh.exe Found: C:\cygwin\bin\sh.exe Found: .\tar.exe Found: C:\cygwin\bin\tar.exe 58k 2002/05/07 .\cygbz2-1.dll 848k 2003/04/11 .\cygcrypto-0.9.7.dll 645k 2003/04/11 .\cygcrypto.dll 45k 2001/04/25 .\cygform5.dll 35k 2002/01/09 .\cygform6.dll 76k 2003/03/09 .\cygform7.dll 28k 2003/03/22 .\cyggdbm-3.dll 19k 2003/03/22 .\cyggdbm.dll 15k 2003/03/22 .\cyggdbm_compat-3.dll 17k 2001/06/28 .\cyghistory4.dll 20k 2002/10/10 .\cyghistory5.dll 929k 2002/06/24 .\cygiconv-2.dll 22k 2001/12/13 .\cygintl-1.dll 28k 2002/09/20 .\cygintl-2.dll 26k 2001/04/25 .\cygmenu5.dll 20k 2002/01/09 .\cygmenu6.dll 48k 2003/03/09 .\cygmenu7.dll 156k 2001/04/25 .\cygncurses++5.dll 175k 2002/01/09 .\cygncurses++6.dll 226k 2001/04/25 .\cygncurses5.dll 202k 2002/01/09 .\cygncurses6.dll 284k 2003/03/09 .\cygncurses7.dll 15k 2001/04/25 .\cygpanel5.dll 12k 2002/01/09 .\cygpanel6.dll 31k 2003/03/09 .\cygpanel7.dll 63k 2003/04/11 .\cygpcre.dll 61k 2003/04/11 .\cygpcreposix.dll 22k 2002/06/09 .\cygpopt-0.dll 108k 2001/06/28 .\cygreadline4.dll 127k 2002/10/10 .\cygreadline5.dll 176k 2003/04/11 .\cygssl-0.9.7.dll 165k 2003/04/11 .\cygssl.dll 50k 2002/03/12 .\cygz.dll 948k 2003/03/18 .\cygwin1.dll Cygwin DLL version info: DLL version: 1.3.22 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 78 Shared data: 3 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Tue Mar 18 09:20:11 EST 2003 CVS tag: dontuse-21 Shared id: cygwin1S3 58k 2002/05/07 .\cygbz2-1.dll 848k 2003/04/11 .\cygcrypto-0.9.7.dll 645k 2003/04/11 .\cygcrypto.dll 45k 2001/04/25 .\cygform5.dll 35k 2002/01/09 .\cygform6.dll 76k 2003/03/09 .\cygform7.dll 28k 2003/03/22 .\cyggdbm-3.dll 19k 2003/03/22 .\cyggdbm.dll 15k 2003/03/22 .\cyggdbm_compat-3.dll 17k 2001/06/28 .\cyghistory4.dll 20k 2002/10/10 .\cyghistory5.dll 929k 2002/06/24 .\cygiconv-2.dll 22k 2001/12/13 .\cygintl-1.dll 28k 2002/09/20 .\cygintl-2.dll 26k 2001/04/25 .\cygmenu5.dll 20k 2002/01/09 .\cygmenu6.dll 48k 2003/03/09 .\cygmenu7.dll 156k 2001/04/25 .\cygncurses++5.dll 175k 2002/01/09 .\cygncurses++6.dll 226k 2001/04/25 .\cygncurses5.dll 202k 2002/01/09 .\cygncurses6.dll 284k 2003/03/09 .\cygncurses7.dll 15k 2001/04/25 .\cygpanel5.dll 12k 2002/01/09 .\cygpanel6.dll 31k 2003/03/09 .\cygpanel7.dll 63k 2003/04/11 .\cygpcre.dll 61k 2003/04/11 .\cygpcreposix.dll 22k 2002/06/09 .\cygpopt-0.dll 108k 2001/06/28 .\cygreadline4.dll 127k 2002/10/10
Re: -p option in man and help [Was: Rsync / SSH / Cygwin ..permission problems..]
On Sat, May 31, 2003 at 11:51:25AM +0200, Lapo Luchini wrote: jw schultz wrote: On Sat, May 31, 2003 at 09:48:47AM +0200, Lapo Luchini wrote: Actually it seems to me the opposite: it has perms also without -p... maybe it is the default? Without -p new files get perms of source as modified by umask. Ohhh. Maybe it's just me, but wouldn't --p, --perms preserve permissions +-p, --perms preserve permissions (do not filter them by umask) be good for people that don't know it? No. Without -p permissions are only copied for new files. Existing files are unchanged. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Rsync / SSH / Cygwin .. permission problems..
On Sat, May 31, 2003 at 09:48:47AM +0200, Lapo Luchini wrote: Actually it seems to me the opposite: it has perms also without -p... maybe it is the default? Without -p new files get perms of source as modified by umask. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-p option in man and help [Was: Rsync / SSH / Cygwin .. permissionproblems..]
jw schultz wrote: On Sat, May 31, 2003 at 09:48:47AM +0200, Lapo Luchini wrote: Actually it seems to me the opposite: it has perms also without -p... maybe it is the default? Without -p new files get perms of source as modified by umask. Ohhh. Maybe it's just me, but wouldn't --p, --perms preserve permissions +-p, --perms preserve permissions (do not filter them by umask) be good for people that don't know it? Lapo -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Rsync / SSH / Cygwin .. permission problems..
Oswell, Michael wrote: [sorry for the full quote, but I'm CCing the cygwin mailing list too] I am attempting to use rsync to mirror data between several windows 2000 and windows XP systems. I am a UNIX person by nature, so decided the easiest way to go about doing this would be to use Cygwin with cron and ssh running as services, then run the rsync connection nightly through cron. Cygwin is installed on both systems and works perfectly. OpenSSH is installed and running, and the rsync user we created is able to ssh using password-less keys between the 2 systems. When I run rsync, it correctly pulls the data down that I want. The problem is that there are NO permissions on the files that are pulled down, so they are basically inaccessable. I have tried with and without the -p option, hoping the files would inherit parent directory permissions if I didn't use it, but it doesn't appear to do so. The command as I run it is; rsync -rlztpv --rsh=ssh --delete remote-fs:/path/to/the/files . or rsync -rlztv --rsh=ssh --delete remote-fs:/path/to/the/files . With the p option included, there are no permission bits set on the files whatsover. Without the p option, it sets the files to 0200. Any ideas here? Both systems have the Domain groups in the groups file, and have the rsync user as well as local users in the passwd file. I would prefer to not have to have ALL domain users in the password file for cygwin if possible. I have also tried this from a DOS shell instead of a cygwin shell with the same results.. Thanks in advance... Are the files on NTFS? Can you give some more detail about the CygWin installation? Whetherver you use ntsec, release number of cygwin and rsync... (to include al this you can attach the output of 'cygcheck -s') BTW: latest packages are cygwin-1.3.22-1 (which afair defaults to ntsec) and rsync-2.5.6-1 -- Lapo 'Raist' Luchini [EMAIL PROTECTED] (PGP X.509 keys available) http://www.lapo.it (ICQ UIN: 529796) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
jw schultz wrote: [...] The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. Am I right in thinking that if you use this option, files will still be selected for syncing if the checksums are different, even if the times are less than 3601 seconds apart? Cheers, Martin -- Martin Sapsed Information Services Who do you say I am? University of Wales, Bangor Jesus of Nazareth -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
On Wed, Apr 02, 2003 at 03:33:30PM +0100, Martin Sapsed wrote: jw schultz wrote: [...] The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. Am I right in thinking that if you use this option, files will still be selected for syncing if the checksums are different, even if the times are less than 3601 seconds apart? If they have the same length and you don't use the -c option which will slow things considerably. Rsync will not ignore changes in file size which significantly reduces the sorts of file mods that would be missed. It takes a very unusual pattern to produce a wrongful skip. This is the script of what it takes to do it. modify file rsync modify file These three steps must occur in sequence and all within one hour and the file size must remain unchanged. Any modifications of the file more than one hour after the last modification prior to the last rsync will be outside the 3601 second modify-window and picked up by the next rsync. I don't suggest making 3601 the normal modify-window. I only say that setting it to 3601 will allow the deferral of fixing the mod-times. Here is another possibility that just occurred to me for correcting with the problem. This will change the timestamps of the files. Whether you use a positive or negative shift will depend on which end you decide to adjust. touch -d '01:00 13-apr-03' /tmp/cmpfile find . -type f ! -newer /tmp/cmpfile | shifttime.pl 3600. -- shifttime.pl --- #!/usr/bin/perl $offset = shift; $offset += 0; !$offset and die must give offset; while (STDIN) { chomp; -w or next; $oldtime = (stat $_)[9]; $oldtime or next; $newtime = $oldtime + $offset; utime $newtime, $newtime, $_; } -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Solution For Rsync and Cygwin Daylight Savings Timezone Problems
Hi, I have been having a number of problems dealing with time zones and synchronising files using Rsync to my linux machine on Cygwin with Windows XP. I have read discussions previously on these mailing lists on how there are problems that occur when there is a change in daylight savings time. I saw a page by http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html that discussed how to set the timezone to UTC and then do an ls to see if the file dates are really the same. If there is a DST problem the suggestion was to set --modify-window=3601 to set a 1 hour fuzzy factor to prevent the problem. I had the same problem but didn't want to set this flag since I was worried I would miss important updates on some files that had changed shortly after an rsync run. I did a lot of reading around about this and in this email I have developed a solution to the problem that I have not seen anywhere else. My solution is for WinXP with FAT filesystem but I am not sure what the effect is with NTFS disks. From what I read up, FAT stores its dates in local time and not in GMT. So it uses an offset from the clock settings to calculate the GMT value to report to Rsync. The problem is that these DST calculations have a bug in that if your clock moves over a DST boundary then files created on the other side of the bounday will mysteriously get a 1 hour offset applied. Unix avoids this problem by having proper DST calculations but Windows doesn't do this right. The references below contain some discussions about how these are calculated. In Adelaide where I live, we left Daylight Savings Time at the end of March, and so now my files are all 3600 seconds off relative to my Linux box. The files were synchronised while DST is in effect. Now DST is off I need to do something about this, I don't really want to resync 20 Gb of data over SSH. If you run a 'stat' program over the files in question, the seconds since 1970 value will be off by 3600. If you change the time zone nothing seems to change and the 1970 values on the Windows box remain the same. FAT is supposed to use the time zone offset to calculate the GMT time but it doesn't seem to take effect. You have to reboot the box! For some reason parts of the TZ settings affect Windows immediately and others don't kick in until many minutes later, so I just reboot to be safe - I spent half a day to discover this, so it is important! So all we need to do is get a time zone which is one hour away from where we are now and it should apply a 1 hour offset to all the GMT values and then this will fix our problem. I live in Adelaide which is GMT+9:30 normally, so I need GMT+10:30. There is no time zone like this so we need to hack the time zone files that Windows uses instead. I downloaded a tool from Microsoft called TZEDIT.EXE that comes with some versions of Windows resource kit. Using this tool, you can edit the time zone settings for the current area you are in. I created a new time zone based on my previous Adelaide one called Cygwin Hacked with GMT+10:30 and daylight savings disabled. Now after doing this you *MUST* activate the time zone change properly. Make the change using TZEDIT, then you need to go to the control panel time/date tool and click on the time zone and hit ok to make it take effect. You can't enable the time zone and then edit it, you have to do it in the right order. Then you must reboot the machine to make it take effect. (It may have a delay to take effect but I don't know how long it is and I'm too lazy to wait all day) Now after the box reboots you will be in GMT+10:30 and when you run Rsync everything just works like a dream, just like it did a week ago before DST finished. You do not need to use --modify-window which could potentially introduce errors and everything just works very well now. In hindsight this problem could have been simplified if I had done the first rsync when DST was not on. So if during July (I am in the southern hemisphere) I did the rsync, then I could have just unticked the support DST box in the clock control panel and could have avoided these problems. Unfortunately because my backup was done when DST was enabled I have to now create a time zone that simulates DST. For now this is my fix for the problem but I am not sure if there are any other effects that I am not aware of. Everything seems to be working fine. Here are some references that I collected while researching this problem. They contain a lot of information about the ways that Windows deals with timestamps on NTFS and FAT filesystems. http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html http://list-archive.xemacs.org/xemacs-nt/199911/msg00130.html http://sources.redhat.com/ml/cygwin/2002-12/msg01065.html http://p2p.wrox.com/archive/c_plus_plus_programming/2001-06/53.asp http://www.codeproject.com/datetime/dstbugs.asp http://lists.samba.org/pipermail/rsync/2000-July/002491.html http://support.microsoft.com/default.aspx?scid=kb;[LN];158588
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
Thanks for the reminder. Unfortunately your email was rambling so that it was unclear what can actually be done to avoid the problem. Here in the US Daylight savings time will take effect this coming Sunday. Given the growing number of sites using rsync in their backup solutions incorporating MS-Windows it would be a good idea, i think, if we could formulate an official advisory that could be propagated to warn these users. Here is a first stab at it. I'm not a windows user so it is possible that what i say here may have a few errors. Rsync and the MS-Windows daylight savings time bug. With the transition between standard time and daylight savings time MS-Windows systems are known to appear to change the modification time of existing files. The effect of this is to give the appearance that every file has changed. This will cause affected transfers to take inordinate amounts of time. This affects FAT filesystems which store times in localtime and not NTFS which uses UTC. Sites using rsync to do automated backups may find the backups do not complete in the expected time-frame immediately after the transition to daylight savings time. Some sites have had the backups take more than 24 hours. To avoid this it is necessary to disable daylight savings time and manually change the system time. The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
Thanks for the reminder. Unfortunately your email was rambling so that it was unclear what can actually be done to avoid the problem. Here in the US Daylight savings time will take effect this coming Sunday. Sorry about the rambling :) I wanted to dump out everything I'd learned because it was quite confusing initially and there was nothing available on how to fix it. The hack I made corrects the problem as such, but I'm not sure if it has other effects that will break other applications. By disabling the daylight savings tick box Windows will not automatically adjust its time, but who knows what else? I wouldn't want to say that this is the correct solution just yet. I've emailed the Cygwin mailing list with the same thing in case someone spots something there and maybe a possible fix to make the DLLs deal with this. With the transition between standard time and daylight savings time MS-Windows systems are known to appear to change the modification time of existing files. The effect of this is to give the appearance that every file has changed. This will cause affected transfers to take inordinate amounts of time. This affects FAT filesystems which store times in localtime and not NTFS which uses UTC. I have not looked into NTFS but I do know it has wierd issues with UTC as well, probably not to the extent of FAT but I don't think it is as clean as Unix-ish implementations. The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. If you run with this flag, does it just skip the updates on those files, or does it update the time stamp mtime as well? I'm thinking it just skips them and you will have to run with --modify-window until DST ends a few months later. regards, Wayne -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
Hi, we had the same problems last year and we use NTFS. Luckely we switched to Linux this year. Kind regards, Bart Coninckx Network Administrator CNE, ASE * Sita ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: [EMAIL PROTECTED] Tel: + 32 (0) 14 62 28 22 Fax: + 32 (0) 14 62 41 47 * Wayne Piekarski [EMAIL PROTECTED] Sent by: To: jw schultz [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED]cc: .samba.orgSubject: Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems 02/04/2003 13:25 Thanks for the reminder. Unfortunately your email was rambling so that it was unclear what can actually be done to avoid the problem. Here in the US Daylight savings time will take effect this coming Sunday. Sorry about the rambling :) I wanted to dump out everything I'd learned because it was quite confusing initially and there was nothing available on how to fix it. The hack I made corrects the problem as such, but I'm not sure if it has other effects that will break other applications. By disabling the daylight savings tick box Windows will not automatically adjust its time, but who knows what else? I wouldn't want to say that this is the correct solution just yet. I've emailed the Cygwin mailing list with the same thing in case someone spots something there and maybe a possible fix to make the DLLs deal with this. With the transition between standard time and daylight savings time MS-Windows systems are known to appear to change the modification time of existing files. The effect of this is to give the appearance that every file has changed. This will cause affected transfers to take inordinate amounts of time. This affects FAT filesystems which store times in localtime and not NTFS which uses UTC. I have not looked into NTFS but I do know it has wierd issues with UTC as well, probably not to the extent of FAT but I don't think it is as clean as Unix-ish implementations. The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. If you run with this flag, does it just skip the updates on those files, or does it update the time stamp mtime as well? I'm thinking it just skips them and you will have to run with --modify-window until DST ends a few months later. regards, Wayne -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Solution For Rsync and Cygwin Daylight Savings Timezone Problems
On Wed, Apr 02, 2003 at 09:55:10PM +1030, Wayne Piekarski wrote: Thanks for the reminder. Unfortunately your email was rambling so that it was unclear what can actually be done to avoid the problem. Here in the US Daylight savings time will take effect this coming Sunday. Sorry about the rambling :) I wanted to dump out everything I'd learned because it was quite confusing initially and there was nothing available on how to fix it. It can't be fixed. At best it might be avoidable at a cost. Otherwise all that can be done is to amelliorate the problems. The hack I made corrects the problem as such, but I'm not sure if it has other effects that will break other applications. By disabling the daylight savings tick box Windows will not automatically adjust its time, but who knows what else? I wouldn't want to say that this is the correct solution just yet. I've emailed the Cygwin mailing list with the same thing in case someone spots something there and maybe a possible fix to make the DLLs deal with this. With the transition between standard time and daylight savings time MS-Windows systems are known to appear to change the modification time of existing files. The effect of this is to give the appearance that every file has changed. This will cause affected transfers to take inordinate amounts of time. This affects FAT filesystems which store times in localtime and not NTFS which uses UTC. I have not looked into NTFS but I do know it has wierd issues with UTC as well, probably not to the extent of FAT but I don't think it is as clean as Unix-ish implementations. If things behaved logically... Oh, yeah this is windws. NTFS stores dates in UTC FAT stores dates in localtime In converting UTC-local and local-UTC windows ignores the date. DST is handled by faking the TZ offset. stat() returns dates in UTC, should use windows internal function which returns UTC times. That would mean that FAT filesystems have wrong offset in UTC-local and NTFS files get no conversion. If stat() uses a windows function that returns localtime then FAT should be OK because it would use libc_local2utc(localtime) but NTFS would be broken beacause it would use libc_local2utc(ms_utc2local(utc)). The impact of this may be minimized by running rsync with the --modify-window=3601 command-line option. This will cause rsync to ignore modification time differences of one hour will allow rsync jobs to complete in the usual time period with a minimal impact on backup integrity. To get back to normal it will be necessary to run rsync with the usual modify-window on all files. This can be done in stages. If you run with this flag, does it just skip the updates on those files, or does it update the time stamp mtime as well? I'm thinking it just skips them and you will have to run with --modify-window until DST ends a few months later. Yes, until you run rsync with the normal --modify-window on them. In the fall someone got badly bitten by this. On tuesday or wednesday he noticed his system running very slow and discovered that the sunday backup was still running, along with all the scheduled ones since then. Getting the files synced required more than 24 hours of rsync time. Most sites it will be a case of rsync taking a couple of hours instead of less than five minutes but for some sites it could take days. Having new jobs kick in just slows the whole thing down because they will catch up with the first one and then run lockstep with it, all of them processing each file in parallel. For such sites they can either make sure that only one job is running and just wait for completion, or they can use the --modify-window=3601 on the main job and when resources are available bring it up to date in peices. To illustrate, assume you have a big system with a bunch of drives (d,e,f,g,h,i,j,k,l). Your normal script backs up each drive in sequence. rsyncopts=-rt --modify-window=1 for drive in d e f g h i j k l do rsync $rsyncopts /$drive bserve::$drive done I know, it's a dumb script but it encapsulates the core logic. If your script were that simple you could simply change it. When this hits each drive takes 6-7 hours to sync. To avoid the problem what you do is modify the script. rsyncopts=-rt --modify-window=3601 To get out of avoidance mode each night you run one of these drives with --modify-window=1. So on monday you schedule rsync -rt --modify-window=1 /d bserve::d on tueseday rsync -rt --modify-window=1 /e bserve::e f is oversized so on wednesday rsync -rt --modify-window=1 /f/bigarea1 bserve::f/bigarea1 rsync -rt --modify-window=1 /f/bigarea2 bserve::f/bigarea2 and thursday you get the rest of f rsync -rt --modify-window=1 /f bserve::f and so on. Once all the of the drives have been done you switch the script back to use --modify-window=1. --
Re: problems with rsync in cygwin
Jim Gallagher wrote: $ rsync -a /cygdrive/c/installs/palm rsync://192.168.2.3/palm rsync: Unknown Host rsh.exe: can't establish connection == ??? ... I thought the docs said that rsync protocol would be used if I used the rsync:// URL. It still wants to use rsh. I'm using rsync version 2.5.5 under Cygwin. In the release notes for 2.5.6: * The rsync:// syntax for daemon connections is now accepted in the destination field. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: problems with rsync in cygwin
Thanks, That syntax works. I've just discovered the importance of the uid option in rsync.conf, and now it seems to work. Thanks to all who replied. Jim On Monday 17 March 2003 11:44 pm, you wrote: Try rsync -a /cygdrive/c/installs/palm 192.168.2.3::palm and make sure you have a correct [palm] section in your rsyncd.conf file. /Greger -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
problems with rsync in cygwin
Hi, I'm trying to set up rsync, with the transfers originating from a Win2K box and going to a Linux box. Both boxes are on my home LAN, so ssh is not required; I thought I would simply use the rsync protocol. I set up xinetd on my Linux box to start a rsync server when needed. My first attempts at a test run failed like so: $ rsync -a /cygdrive/c/installs/palm rsync://192.168.2.3/palm rsync: Unknown Host rsh.exe: can't establish connection == ??? rsync: read error: Connection reset by peer rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/i o.c(162) I thought the docs said that rsync protocol would be used if I used the rsync:// URL. It still wants to use rsh. I'm using rsync version 2.5.5 under Cygwin. So, I reread the man page and found the RSYNC_RSH environment variable could be used to specify the protocol, so I set it like so: RSYNC_RSH=rsync and tried again. The first error is gone, only to be replaced with another: $ rsync -vva /cygdrive/c/installs/palm rsync://192.168.2.3/palm opening connection using rsync rsync rsync --server -vvlogDtpr . //192.168.2.3/palm building file list ... expand file_list to 4000 bytes, did move done push_dir rsync : No such file or directory (4) rsync error: errors selecting input/output files, dirs (code 3) at /tmp/rsync-2.5.5/main.c(468) rsync: connection unexpectedly closed (8 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/io.c(150) What should I look at next? Thanks, Jim Gallagher -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: problems with rsync in cygwin
i don't think you are actually getting connected to the target host. better check your network settings. and on the second instance you appear to be having the same problem, but you've masked it by saying RSYNC_RSH=rsync. That is not correct. rsync is the transfer protocol...rsh is the connection mechanism to start rsync on the remote end. You should not need to specify RSYNC_RSH=rsync as that is simply not correct. check and make sure you can ping/telnet the target host. -mike On Mon, Mar 17, 2003 at 10:37:33PM -0800, Jim Gallagher wrote: Hi, I'm trying to set up rsync, with the transfers originating from a Win2K box and going to a Linux box. Both boxes are on my home LAN, so ssh is not required; I thought I would simply use the rsync protocol. I set up xinetd on my Linux box to start a rsync server when needed. My first attempts at a test run failed like so: $ rsync -a /cygdrive/c/installs/palm rsync://192.168.2.3/palm rsync: Unknown Host rsh.exe: can't establish connection == ??? rsync: read error: Connection reset by peer rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/i o.c(162) I thought the docs said that rsync protocol would be used if I used the rsync:// URL. It still wants to use rsh. I'm using rsync version 2.5.5 under Cygwin. So, I reread the man page and found the RSYNC_RSH environment variable could be used to specify the protocol, so I set it like so: RSYNC_RSH=rsync and tried again. The first error is gone, only to be replaced with another: $ rsync -vva /cygdrive/c/installs/palm rsync://192.168.2.3/palm opening connection using rsync rsync rsync --server -vvlogDtpr . //192.168.2.3/palm building file list ... expand file_list to 4000 bytes, did move done push_dir rsync : No such file or directory (4) rsync error: errors selecting input/output files, dirs (code 3) at /tmp/rsync-2.5.5/main.c(468) rsync: connection unexpectedly closed (8 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/io.c(150) What should I look at next? Thanks, Jim Gallagher -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: problems with rsync in cygwin
Try rsync -a /cygdrive/c/installs/palm 192.168.2.3::palm and make sure you have a correct [palm] section in your rsyncd.conf file. /Greger --- Jim Gallagher [EMAIL PROTECTED] skrev: Hi, I'm trying to set up rsync, with the transfers originating from a Win2K box and going to a Linux box. Both boxes are on my home LAN, so ssh is not required; I thought I would simply use the rsync protocol. I set up xinetd on my Linux box to start a rsync server when needed. My first attempts at a test run failed like so: $ rsync -a /cygdrive/c/installs/palm rsync://192.168.2.3/palm rsync: Unknown Host rsh.exe: can't establish connection == ??? rsync: read error: Connection reset by peer rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/i o.c(162) I thought the docs said that rsync protocol would be used if I used the rsync:// URL. It still wants to use rsh. I'm using rsync version 2.5.5 under Cygwin. So, I reread the man page and found the RSYNC_RSH environment variable could be used to specify the protocol, so I set it like so: RSYNC_RSH=rsync and tried again. The first error is gone, only to be replaced with another: $ rsync -vva /cygdrive/c/installs/palm rsync://192.168.2.3/palm opening connection using rsync rsync rsync --server -vvlogDtpr . //192.168.2.3/palm building file list ... expand file_list to 4000 bytes, did move done push_dir rsync : No such file or directory (4) rsync error: errors selecting input/output files, dirs (code 3) at /tmp/rsync-2.5.5/main.c(468) rsync: connection unexpectedly closed (8 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at /tmp/rsync-2.5.5/io.c(150) What should I look at next? Thanks, Jim Gallagher -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html _ Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express Se mer på: http://se.docs.yahoo.com/info/express/help/index.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: /me dead for a short while [Was: rsync in cygwin as service]
Dmitry Melekhov wrote: Well, now I know that _latest_ rsync does not work in daemon mode at all, Works for me. i.e. when I start it with --daemon it simply exits without any error messages. But could you tell me is there rsync version which I can use in cygwin right now? Yep. The current version on the Cygwin mirrors. Works just fine. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
rsync in cygwin as service
Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach C:\cygwin\bincygrunsrv -S RSYNC cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. And I see in event log: The description for Event ID ( 0 ) in Source ( RSYNC ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: RSYNC : Win32 Process Id = 0x148 : Cygwin Process Id = 0x148 : starting service `RSYNC' failed: signal 11 raised. $ rsync --version rsync version 2.5.5 protocol version 26 Any ideas? Thank you! -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
Hi! U can try the following way 1) Make a directory called RSYNC and copy rsync.exe, supporting dll files (cryptogrph-0.dll, cygwin1.dll), srvany.exe in this directory 2) now go to dos prompt .. (c:\rsync) and give command instsrv Rsync c:\rsync\srvany.exe 3) this will install the service in win2k... 4) now u need to give all parameters in services in control panel...for running it in daemon. Nits. Dmitry Melekhov wrote: Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach C:\cygwin\bincygrunsrv -S RSYNC cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. And I see in event log: The description for Event ID ( 0 ) in Source ( RSYNC ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: RSYNC : Win32 Process Id = 0x148 : Cygwin Process Id = 0x148 : starting service `RSYNC' failed: signal 11 raised. $ rsync --version rsync version 2.5.5 protocol version 26 Any ideas? Thank you! -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
You should perhaps also mention that the tools you refer to are part of the Resource Kit and are not available as such in Windows. Kind regards, Bart Coninckx Network Administrator CNE, ASE * Sita ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: [EMAIL PROTECTED] Tel: + 32 (0) 14 62 28 22 Fax: + 32 (0) 14 62 41 47 Nitin Agarwal [EMAIL PROTECTED]To: Dmitry Melekhov [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED] rsync-bounces+bart.coninckx=watco.be@listsSubject: Re: rsync in cygwin as service .samba.org 11/02/2003 14:40 Please respond to nitin.agarwal Hi! U can try the following way 1) Make a directory called RSYNC and copy rsync.exe, supporting dll files (cryptogrph-0.dll, cygwin1.dll), srvany.exe in this directory 2) now go to dos prompt .. (c:\rsync) and give command instsrv Rsync c:\rsync\srvany.exe 3) this will install the service in win2k... 4) now u need to give all parameters in services in control panel...for running it in daemon. Nits. Dmitry Melekhov wrote: Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach C:\cygwin\bincygrunsrv -S RSYNC cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. And I see in event log: The description for Event ID ( 0 ) in Source ( RSYNC ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: RSYNC : Win32 Process Id = 0x148 : Cygwin Process Id = 0x148 : starting service `RSYNC' failed: signal 11 raised. $ rsync --version rsync version 2.5.5 protocol version 26 Any ideas? Thank you! -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
Yap... but these can be downloaded from net... all of them are available. [EMAIL PROTECTED] wrote: You should perhaps also mention that the tools you refer to are part of the Resource Kit and are not available as such in Windows. Kind regards, Bart Coninckx Network Administrator CNE, ASE * Sita ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: [EMAIL PROTECTED] Tel: + 32 (0) 14 62 28 22 Fax: + 32 (0) 14 62 41 47 Nitin Agarwal [EMAIL PROTECTED]To: Dmitry Melekhov [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED] rsync-bounces+bart.coninckx=watco.be@listsSubject: Re: rsync in cygwin as service .samba.org 11/02/2003 14:40 Please respond to nitin.agarwal Hi! U can try the following way 1) Make a directory called RSYNC and copy rsync.exe, supporting dll files (cryptogrph-0.dll, cygwin1.dll), srvany.exe in this directory 2) now go to dos prompt .. (c:\rsync) and give command instsrv Rsync c:\rsync\srvany.exe 3) this will install the service in win2k... 4) now u need to give all parameters in services in control panel...for running it in daemon. Nits. Dmitry Melekhov wrote: Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach C:\cygwin\bincygrunsrv -S RSYNC cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. And I see in event log: The description for Event ID ( 0 ) in Source ( RSYNC ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: RSYNC : Win32 Process Id = 0x148 : Cygwin Process Id = 0x148 : starting service `RSYNC' failed: signal 11 raised. $ rsync --version rsync version 2.5.5 protocol version 26 Any ideas? Thank you! -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
/me dead for a short while [Was: rsync in cygwin as service]
Dmitry Melekhov wrote: Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Sorry to you and other people that waits for me to test/debug cygwin-specific problems in latest rsync, but my windows machine is actually dead (it's the same CyberOne as seen 'long time offline' from http://build.samba.org/). I guess I must change CPU and/or MB so it will take a while. Sorry. In Italy we say something that sounds like it always rains where it's already wet =( Lapo -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach I've found on cygwin that I need to explicitly tell it where the config file is, both on the command line and with cygrunsrv. I haven't investigated; perhaps the platform default is some other file. These commands work for me: rsync --config=/etc/rsyncd.conf --daemon and cygrunsrv -I RSYNC -p /bin/rsync.exe -a '--config=/etc/rsyncd.conf --daemon --no-detach' Craig -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: /me dead for a short while [Was: rsync in cygwin as service]
Hello! Well, now I know that _latest_ rsync does not work in daemon mode at all, i.e. when I start it with --daemon it simply exits without any error messages. But could you tell me is there rsync version which I can use in cygwin right now? Could someone mail me .exe ? Thank you! Lapo Luchini wrote: Dmitry Melekhov wrote: Hello! I want to start rsync on w2k as service. If I try to start rsync from command line it simply do nothig: $ rsync --daemon Sorry to you and other people that waits for me to test/debug cygwin-specific problems in latest rsync, but my windows machine is actually dead (it's the same CyberOne as seen 'long time offline' from http://build.samba.org/). I guess I must change CPU and/or MB so it will take a while. Sorry. In Italy we say something that sounds like it always rains where it's already wet =( Lapo -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
Craig Barratt wrote: If I try to start rsync from command line it simply do nothig: $ rsync --daemon Administrator@dm-w2ks /usr/bin $ ps PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 480 1 480480 con 500 04:15:03 /usr/bin/bash 1428 4801428 1420 con 500 05:26:46 /usr/bin/ps Administrator@dm-w2ks /usr/bin So I'm trying to set it as service: C:\cygwin\bincygrunsrv -I RSYNC -d Rsync -p /bin/rsync.exe -a --daemon --n o-detach I've found on cygwin that I need to explicitly tell it where the config file is, both on the command line and with cygrunsrv. I haven't investigated; perhaps the platform default is some other file. These commands work for me: rsync --config=/etc/rsyncd.conf --daemon and cygrunsrv -I RSYNC -p /bin/rsync.exe -a '--config=/etc/rsyncd.conf --daemon --no-detach' Craig Certanly, I tried --config Could you tell me which rsync version do you use? -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
Certanly, I tried --config Could you tell me which rsync version do you use? rsync 2.5.5 and rsync 2.5.6 both work fine for me. Is it possible that rsync is already running as a service? It won't show up in cygwin's ps. For example, when rsync is running via cygrunsrv, if I type: rsync --daemon it exits with no error, but ps shows no process. But rsync is indeed running, eg: tcsh 438% telnet localhost 873 Trying 127.0.0.1... Connected to . Escape character is '^]'. @RSYNCD: 26 quit @ERROR: protocol startup error Connection closed by foreign host. You can also see rsync.exe in the windows task manager. You could also try a different port number to see if there is someone else on 873: craigslt 461% ps aux | egrep rsync craigslt 462% rsync --daemon --port=1234 craigslt 463% ps aux | egrep rsync 4020 14020 4020? 1005 23:29:08 /bin/rsync Craig -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: rsync in cygwin as service
Craig Barratt wrote: You could also try a different port number to see if there is someone else on 873: craigslt 461% ps aux | egrep rsync craigslt 462% rsync --daemon --port=1234 craigslt 463% ps aux | egrep rsync 4020 14020 4020? 1005 23:29:08 /bin/rsync Unfortunately, rsync does not responds if I run it with --daemon from command line... Could you send me your rsync.exe? Thank you! -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Rsync on Cygwin testsuite results
I hacked config.h to undefine HAVE_SOCKETPAIR. Cygwin's socketpair was failing randomly, causing errors on roughly a third of testsuite runs. Having made that alteration (so rsync was using pipe, not socketpair), I ran the testsuite 100 times. SSH tests were not enabled. Out of 100 runs, 4 hung on the daemon test. The remaining 96 passed or skipped all tests. So - one lurking hang, one problem (with socketpair) with an easy workaround. Not too bad really, if I can make any further headway in tracing that hang. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
rsync and cygwin on win XP freeze/hanging
I am running rsync under cygwin on a winXP pro system. Cygwin is the most recent version (1.3.12-2) and rsync 2.5.5 protocol 26. It seems that almost %50 of the time, rsync hangs after the last file is done syncing. When it's hung, I can press ctrl-c, and an error message: rsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(229) pops out. It does not exit, however, and I must kill the process using task manager. I am syncing a few directories to my backup hard drive, which is local. There's no remote network access going on that I know of. Using tcpview from sysinternals.com, I can see that when a process hangs, its ports are still open. When I get a clean exit, all ports are closed. I ran it a few times with strace, and the ones that got stuck seemed to be in a loop and calling select a lot. I've been more successful in reproducing the problem when the commands are inside a .bat file or in a .sh file which I've associated with bash.exe. When I just double-click on the file, it seems to hang quite often, but I haven't yet been able to get it to hang when running it from the cygwin bash prompt. I've found quite a few messages talking about hanging problems, but none of the answers have helped me. TIA -- Brian Mathis Direct Edge http://www.directedge.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
Combined reply: Mark - Point taken. But even if it worked correctly everywhere, to me there seems to be something aesthetically wrong about just letting sockets close themselves. Kind of like a malloc() without a free(). Wayne - Wouldn't the atexit solution require that we keep a list of fds to close? Anyway, I think it is now up to me to make a patch which fixes the problem in the most discreet and unsweeping manner possible, and then post it for Martin to decide. Max. Mark Eichin [EMAIL PROTECTED] wrote: Just because Linux lets you get away without it doesn't mean its a good idea. Except this has nothing to do with linux - this is unix behaviour that goes all the way back, it's part of the process model. It's part of what exiting *does*, so it *is* a bug in cygwin if it isn't doing the cleanup (and really, cygwin does so many other bizarre things under the covers to create Unix/POSIX semantics in the Very Different win32 environment, I'm more than a little surprised it isn't doing this already... skeptical, even, though I haven't been deep inside cygwin in years.) Wayne Davison [EMAIL PROTECTED] wrote: On Thu, 16 May 2002, Max Bowsher wrote: That just moves the shutdown call from where you finish with the fd to where you start using the fd - that's got to be less intuitive. Being more or less intuitive is not the point. The idea was to have as little cygwin kludge code as possible. Thus, we'd just have one call to atexit() during startup, with the single cleanup function being able to handle any and all opened sockets, and we're done (if this is even feasible -- I haven't looked into it). This was prompted by Martin's statement that he considers this a cygwin bug -- I was assuming that he didn't want to make sweeping changes to all the cleanup code in rsync. Whether he wants to handle this in a more invasive manner is up to him. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
No. That just moves the shutdown call from whren you finish with the fd to where you start using the fd - that's got to be less intuitive. Surely it isn't too much to close file descriptors you open? Just because Linux lets you get away without it doesn't mean its a good idea. Anyway, if I provide a patch that neatly closes socket fds when they are no longer needed, will it get applied? Max. Wayne Davison [EMAIL PROTECTED] wrote: Here's an idea which I haven't had a chance to investigate: Would it be possible to use atexit() to register a call to shutdown() for cygwin (or a call to a custom function that would call shutdown() for the appropriate socket fds)? This should allow cgywin's broken socket code to get properly cleaned up without having to sprinkle a bunch of cygwin-specific code all over the source (as long as the socket fds don't get closed before we start the exit handling). ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connectionreset by peer' error for rsync on cygwin
On Thu, 16 May 2002, Max Bowsher wrote: That just moves the shutdown call from where you finish with the fd to where you start using the fd - that's got to be less intuitive. Being more or less intuitive is not the point. The idea was to have as little cygwin kludge code as possible. Thus, we'd just have one call to atexit() during startup, with the single cleanup function being able to handle any and all opened sockets, and we're done (if this is even feasible -- I haven't looked into it). This was prompted by Martin's statement that he considers this a cygwin bug -- I was assuming that he didn't want to make sweeping changes to all the cleanup code in rsync. Whether he wants to handle this in a more invasive manner is up to him. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
Just because Linux lets you get away without it doesn't mean its a good idea. Except this has nothing to do with linux - this is unix behaviour that goes all the way back, it's part of the process model. It's part of what exiting *does*, so it *is* a bug in cygwin if it isn't doing the cleanup (and really, cygwin does so many other bizarre things under the covers to create Unix/POSIX semantics in the Very Different win32 environment, I'm more than a little surprised it isn't doing this already... skeptical, even, though I haven't been deep inside cygwin in years.) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
I wasn't. But he's addressing the same problem, in a difference case to my initial patch Max. Are you all aware of the work done by Jonathan Kamens last July? See bug 3236 ... http://rsync.samba.org/cgi-bin/rsync/incoming?id=3236 Sorry if this has already been discussed: I am joining the thread late. Bob Byrnese-mail: [EMAIL PROTECTED] -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connectionreset by peer' error for rsync on cygwin
Here's an idea which I haven't had a chance to investigate: Would it be possible to use atexit() to register a call to shutdown() for cygwin (or a call to a custom function that would call shutdown() for the appropriate socket fds)? This should allow cgywin's broken socket code to get properly cleaned up without having to sprinkle a bunch of cygwin-specific code all over the source (as long as the socket fds don't get closed before we start the exit handling). ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
After thinking about it a bit more I'm somewhat inclined to call it a bug in Cygwin and try to get them to fix it. Well, you could, but I'd much prefer it if you didn't :-) I guess its time for you to make an executive descision - Is it reasonable to include code in rsync to close sockets, even though exit() does it anyway on most platforms. I would argue that a few close_socket() calls woudn't cause any clutter - but then my interest is obviously focused on cygwin. If you do give the go-ahead, then should I fix this inconsistency whilst I am at it: In main(), rsync decides whether to be a daemon, server, or client. The functions for some code paths are designed not to return, whilst others are designed to return. Would it be better for all code paths to return to main _as long as that does not cause extra mess_? Thanks, Max. More context below: Martin Pool [EMAIL PROTECTED] wrote: On 10 May 2002, Max Bowsher [EMAIL PROTECTED] wrote: The problem was especially severe here, because rsync didn't even close the socket in these cases - it would write its last data, then return a couple of times, and exit(). It should not matter: The function _exit terminates the calling process immediately. Any open file descriptors belonging to the process are closed; any children of the process are inherited by process 1, init, and the process's parent is sent a SIGCHLD signal. We could have a shutdownsocket(). Is it worth it for just for 2 lines of code? shutdown(fd, SHUT_WR); close(fd); Yes, because (if this is really necessary) then it's a workaround for a platform bug and so not obvious. After thinking about it a bit more I'm somewhat inclined to call it a bug in Cygwin and try to get them to fix it. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
On 10 May 2002, Max Bowsher [EMAIL PROTECTED] wrote: The problem was especially severe here, because rsync didn't even close the socket in these cases - it would write its last data, then return a couple of times, and exit(). It should not matter: The function _exit terminates the calling process immediately. Any open file descriptors belonging to the process are closed; any children of the process are inherited by process 1, init, and the process's parent is sent a SIGCHLD signal. We could have a shutdownsocket(). Is it worth it for just for 2 lines of code? shutdown(fd, SHUT_WR); close(fd); Yes, because (if this is really necessary) then it's a workaround for a platform bug and so not obvious. After thinking about it a bit more I'm somewhat inclined to call it a bug in Cygwin and try to get them to fix it. PS: Someone mentioned that 2.5.6 has branched in CVS. I'm a bit of a CVS newbie unfortunately - what is the command for 'what branches exist in the repository?' cvs log or http://cvs.samba.org/ will show you all the tags and branches. But at the moment there is only really one branch. -- Martin -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
Martin Pool [EMAIL PROTECTED] wrote: Sorry, I've been out of town this week. No problem. This is the shutdown one, right? I wanted to check about portability before we put it in. Snader's Effective TCP/IP Programming says that shutdown(fd, 1); is OK on both Unix and Windows and will avoid errors from closing the socket. So I think it's OK to put it in. Winsock misinterprets other values of the second parameter so we can't use them. Yes, this is the shutdown one. This issue certainly does not require any other shutdown second parameter, so we are safe there. I don't understand why you need to only insert this call here and not in every case where a socket is closed. If there's no specific reason we should have a common shutdownsocket() routine and call it; if there is a reason we should document it. Kludginess. I did the quickest fix to the immediate problem I had, which didn't require me to trace through the lifetime of all socket handles used everywhere in rsync. The problem was especially severe here, because rsync didn't even close the socket in these cases - it would write its last data, then return a couple of times, and exit(). We could have a shutdownsocket(). Is it worth it for just for 2 lines of code? shutdown(fd, SHUT_WR); close(fd); If you say yes, then fair enough. In any case, I will study the rsync code in greater detail, and produce a patch covering every case a socket is closed. Max. PS: Someone mentioned that 2.5.6 has branched in CVS. I'm a bit of a CVS newbie unfortunately - what is the command for 'what branches exist in the repository?' -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
On 9 May 2002, Dave Dykstra [EMAIL PROTECTED] wrote: The answer has to come from Martin and I haven't seen anything posted from him lately, he must be unavailable. Sorry, I've been out of town this week. On Tue, May 07, 2002 at 03:28:06PM +0100, Max Bowsher wrote: Hi. On the one hand, I don't want to annoy anyone with repeated emails :-), but on the other, I would like to know the chances of the patch making it in to 2.5.6. Even if the answer is 'Maybe - too busy to think about it right now', I will be satisfied, but if I need to revise it before it can be considered, I would like to know that. This is the shutdown one, right? I wanted to check about portability before we put it in. Snader's Effective TCP/IP Programming says that shutdown(fd, 1); is OK on both Unix and Windows and will avoid errors from closing the socket. So I think it's OK to put it in. Winsock misinterprets other values of the second parameter so we can't use them. I don't understand why you need to only insert this call here and not in every case where a socket is closed. If there's no specific reason we should have a common shutdownsocket() routine and call it; if there is a reason we should document it. Thanks, -- Martin -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
On Thu, May 09, 2002 at 04:22:45PM -0700, Martin Pool wrote: shutdown(fd, 1); Perhaps use SHUT_WR instead of 1? -- Jos Backus _/ _/_/_/Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/_/ [EMAIL PROTECTED] _/_/ _/_/_/use Std::Disclaimer; -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
rsync on cygwin: can't access mapped network drive remotely
I posted this message to the cygwin mailing list, but I thought I'd try it here too... flip - Hello, I am using rsync 2.5.5 protocol version 26 with cygwin 1.3.10-1. When I connect to a directory that resides on the computer, everything works great. When I connect to a directory that is a mapped UNC drive, rsync cannot find any files: tick:~/foo/bar$ net use 'y:' '\\tick\chairface' The command completed successfully. tick:~/foo/bar$ ls /y/foo/bar arthur.txt* diefled.txt* tick:~/foo/bar$ rsync -nCuvaz localhost:/y/foo/bar/ . receiving file list ... link_stat /y/foo/bar/. : No such file or directory done client: nothing to do: perhaps you need to specify some filenames or the --recursive option? rsync error: partial transfer (code 23) at main.c(594) This only happens over the network; it works without the colon: tick:~/foo/bar$ rsync -nCuvaz /y/foo/bar/ . building file list ... done arthur.txt diefled.txt wrote 129 bytes read 28 bytes 314.00 bytes/sec total size is 15924 speedup is 101.43 It breaks whether rsync is run on a local or remote machine. It breaks with drives mapped to UNC shares from my local (windows) machine (as above), or to drives mapped to samba network shares. The output of cygcheck is attached, and some other possibly interesting details are appended. Thanks for any ideas. flip tick:~$ ls -ld /? drwxr-xr-x 11 flip administ0 May 7 05:13 /c/ drwxr-xr-x1 flipcyg usercyg 0 May 7 06:25 /f/ drwxr-xr-x5 flip administ0 Dec 31 1979 /h/ drwxr-xr-x5 flip administ0 Dec 31 1979 /m/ drwxr-xr-x1 help helpserv0 May 3 11:52 /u/ drwxr-xr-x1 everyone everyone0 May 7 05:13 /y/ tick:~$ ls -ld /x drwxr-xr-x1 flip administ0 Dec 31 1979 /x/ [/x doesn't appear in the ls because the directory c:\unix\f and c:\unix\y exist but c:\unix\x doesn't. Either way the error occurs.] tick:~$ net use New connections will be remembered. Status Local Remote Network --- OK F:\\granular\me Microsoft Windows Network OK U:\\granular\usersMicrosoft Windows Network OK X:\\tick\thrakkorzog Microsoft Windows Network OK Y:\\tick\chairfaceMicrosoft Windows Network The command completed successfully. tick:~/foo$ mount c:\unix\bin on /usr/bin type system (binmode) c:\unix\lib on /usr/lib type system (binmode) c:\unix on / type system (binmode) c: on /c type system (binmode) f: on /f type system (binmode) h: on /h type system (binmode) m: on /m type system (binmode) u: on /u type system (binmode) y: on /y type system (binmode) x: on /x type system (binmode,noumount) The directories C:\unix\f and C:\unix\y exist and were explicitly mounted. The directory c:\unix\x does not; /x is an automagical (cygdrive) mount. Cygwin Win95/NT Configuration Diagnostics Current System Time: Tue May 07 06:39:08 2002 Windows XP Professional Ver 5.1 Build 2600 Path: c:\unix\bin c:\unix\sbin c:\unix\bin c:\unix\usr\local\bin c:\unix\usr\X11R6\bin c:\apps\utils c:\windows c:\windows\system32 c:\windows\system32\wbem c:\apps\Applications\Matlab\bin\win32 SysDir: C:\WINDOWS\System32 WinDir: C:\WINDOWS CYGWIN = `binmode ntsec tty' HOME = `h:\flip' LD_LIBRARY_PATH = `\lib:\usr\lib\:\usr\local\lib:\usr\X11R6\lib\' MAKE_MODE = `unix' PWD = `/h/flip/foo' USER = `flip' Use `-r' to scan registry a: fd N/AN/A c: hd NTFS4996Mb 93% CP CS UN PA FC Chairface f: net NTFS 51677Mb 73% CP CSPAme h: hd FAT32 9654Mb 82% CPUN THRAKKORZOG m: hd FAT32 23285Mb 90% CPUN MRMENTAL r: cd N/AN/A u: net NTFS 51677Mb 73% CP CSPAusers ./ usertextmode,noumount c:\unix / system binmode c: /csystem binmode f: /fsystem binmode h: /hsystem binmode m: /msystem binmode u: /usystem binmode c:\unix\bin /usr/bin system binmode c:\unix\lib /usr/lib system binmode ./ userbinmode,noumount Found: c:\unix\bin\bash.exe Found: c:\unix\bin\cat.exe Found: c:\unix\bin\cpp.exe Found: c:\unix\usr\local\bin\find.exe Found: c:\unix\bin\gcc.exe Found: c:\unix\bin\gdb.exe Found: c:\unix\bin\ld.exe Found: c:\unix\bin\ls.exe Found: c:\unix\bin\make.exe Found:
Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
What is the status of my patch? If the answer is 'In a ToDo list', then I will be quite happy, but if there are any objections to it, I would like to resolve them. Thankyou. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
What is the status of this patch? (Ideally I'd like it to make it in to 2.5.6, so I can stop using a modified version). I have successfully used rsync with the patch on Linux, and have done a test where a client does connect(), then sleep(), whilst the server does write(), shutdown(,SHUT_WR),close(), before the client does read(), and this completes successfully. If there is anything else I should do to help it along, please let me know. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
I though that shutdown acts as below: -- Syntax: int shutdown(int sockfd, int howto); returns 0 if OK, -1 on error. Action of the function depends on the value of howto - SHUT_RD - read half of the connection is closed. The data currently in the socket receive buffer is discarded. SHUT_WR - write half of the connection is closed. The data in the socket send buffer is sent followed by the normal TCP connection termination sequence. SHUT_RDWR - both read and write halves of the connection are closed. -- ( from http://www.google.com/search?q=cache:B6qVFvpm-p4C:www.ncst.ernet.in/~netfac/PGDI T/ppt/IOmultiplex.ppt+Unix+socket+programming+shutdown+SHUT_WRhl=enie=UTF8) SUSv2 is annoyingly somewhat vague on the specifics. Perhaps you were thinking of SHUT_RD as discarding data? My patch used only SHUT_WR, so it should be safe unless the above is totally wrong. I've just done a quick test with my patch on Linux, and didn't see any problem. Max. Martin Pool [EMAIL PROTECTED] wrote: From memory, Practical TCP Programming says that this behaviour is caused by a misunderstanding of the sockets API by the WinSock programmers. The correct meaning of shutdown() on Unix is to throw away any outstanding data and close the socket immediately. Normally, when you close a socket, you do want to let any pending data get across, so it's rarely used. On Windows shutdown() does not throw away data, and should be called. (Trust M$ to get it backwards and force everybody else to adapt.) So the patch cannot go in as is, because I think it will break Unix. Something like it can go in, #ifdefed for W32. smime.p7s Description: application/pkcs7-signature
Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
On Fri, Apr 26, 2002 at 05:40:07PM +0100, Max Bowsher wrote: Action of the function depends on the value of howto - SHUT_RD - read half of the connection is closed. The data currently in the socket receive buffer is discarded. SHUT_WR - write half of the connection is closed. The data in the socket send buffer is sent followed by the normal TCP connection termination sequence. SHUT_RDWR - both read and write halves of the connection are closed. Slightly off-topic (sorry) but interesting perhaps: had socket() been designed to return an int[2] (like pipe() and socketpair()), shutdown() would not have been necessary and one could have just used close() on each descriptor instead. -- Jos Backus _/ _/_/_/Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/_/ [EMAIL PROTECTED] _/_/ _/_/_/use Std::Disclaimer; -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
RE: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
Max Bowsher [[EMAIL PROTECTED]] writes: I though that shutdown acts as below: (no data loss) SUSv2 is annoyingly somewhat vague on the specifics. So are the FreeBSD/Linux man pages. They don't specifically indicate truncation or flushing of data, although I don't recall ever thinking of shutdown() as truncating. To be, what Microsoft got wrong in WinSock is _requiring_ shutdown() to reliably close a socket while ensuring all final data gets delivered. It certainly caught me by surprise (and annoyance) at one point. I rarely ever used it in a Unix environment, but I do think it should be safe. -- David /---\ \ David Bolen\ E-mail: [EMAIL PROTECTED] / | FitLinxx, Inc.\ Phone: (203) 708-5192| / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \ \---/ -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin
Does anybody know if this might cause problems on non-Windows machines? Would shutdown need to be checked in configure, or is it implemented on all Unix variants? I don't recall ever seeing a need for it on Unix. - Dave On Wed, Apr 03, 2002 at 11:39:57AM +0100, Max Bowsher wrote: The problem is caused because rsync does not close its sockets, and WinSock is a quite strict on this. The solution is to shutdown and close the fd. This is a 5-minute hack I've done to fix the obvious occurrences of the problem. It might be better to extend rsyncs cleanup functions for this, but here it is anyway to alert people to the problem and its fix. Max. BEGIN PATCH diff -mru rsync-2.5.5/clientserver.c rsync-2.5.5-tweaked/clientserver.c --- rsync-2.5.5/clientserver.c Wed Mar 27 01:03:13 2002 +++ rsync-2.5.5-tweaked/clientserver.c Wed Apr 3 11:01:57 2002 -486,39 +486,44 } if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (sscanf(line,RSYNCD: %d, remote_version) != 1) { io_printf(fd,ERROR: protocol startup error\n); - return -1; + goto exitwithnomodule; } while (i == -1) { line[0] = 0; if (!read_line(fd, line, sizeof(line)-1)) { - return -1; + goto exitwithnomodule; } if (!*line || strcmp(line,#list)==0) { send_listing(fd); - return -1; + goto exitwithnomodule; } if (*line == '#') { /* it's some sort of command that I don't understand */ io_printf(fd,ERROR: Unknown command '%s'\n, line); - return -1; + goto exitwithnomodule; } i = lp_number(line); if (i == -1) { io_printf(fd,ERROR: Unknown module '%s'\n, line); - return -1; + goto exitwithnomodule; } } return rsync_module(fd, i); + +exitwithnomodule: + shutdown(fd,SHUT_WR); + close(fd); + return -1; } END PATCH -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html