I just installed rsync on two machines, I think I'm a complete moron, and I need a clue bat. The remote machine's /etc/rsyncd.conf (just for testing): use chroot = no log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock [auth] path = /var/www/auth comment = apache authentication files. read only = yes Then for a test, I fired up /usr/local/bin/rsync --daemon on the remote machine. On the local machine, I did: % rsync -avz -e ssh defiance:auth /var/www/auth root@defiance's password: receiving file list ... link_stat auth : No such file or directory done client: nothing to do FYI, /var/www/auth on the remote machine _does_ exist. So that obviously didn't work, but then I did this: % rsync -avz -e ssh defiance:/var/www/auth /var/www/auth root@defiance's password: receiving file list ... done created directory /var/www/auth auth/ auth/foo/ auth/bar/ auth/baz/ etc.... And it works. But this next part I don't understand.. I kill the rsync daemon on the remote host, then I try the above command line again on the local host and it works!? Say what?! By using ssh does it bypass the remote daemon altogether? Plus, `hosts access' doesn't work in my /etc/rsyncd.conf and using rsync as a daemon through inetd or xinetd doesn't even let me make a connection. It's like it's not reading /etc/rsyncd.conf -- I just don't get it. % rsync --version rsync version 2.4.6 protocol version 24 Written by Andrew Tridgell and Paul Mackerras -- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.
On Mon, Nov 19, 2001 at 12:24:53PM -0500, Brian Clark wrote:> And it works. But this next part I don't understand.. I kill the rsync > daemon on the remote host, then I try the above command line again on > the local host and it works!? Say what?! By using ssh does it bypass > the remote daemon altogether?Yes. When ssh is used, sshd receives the connection, and rsync remote executes rsync on the server, using permissions it recieved via ssh.> Plus, `hosts access' doesn't work in my /etc/rsyncd.conf and using > rsync as a daemon through inetd or xinetd doesn't even let me make a > connection. > > It's like it's not reading /etc/rsyncd.conf -- I just don't get it.It isn't. When using ssh, just handle access in the same way you'd normally handle ssh access. -drew -- M. Drew Streib <dtype@dtype.org>, Free Standards Group co-founder, SourceForge.net | core team, freedb | sysadmin, Linux Intl. creator, keyanalyze report | sysadmin, *.us.pgp.net | other, see freedom/law -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20011119/8f78de32/attachment.bin
-e ssh is for external transport. So is the single colon syntax (defiance:auth) Use this cmdline: rsync -avz defiance::auth /var/www/auth Also, I'm guessing you want the contents of auth in /var/www/auth, in which case you want rsync -avz defiance::auth /var/www else, you'll get /var/www/auth/auth The documentation (well written, easily read, but sometimes, the app doesn't obey the doc) says you could use rsync -avz defiance::auth/ /var/www/auth as the trailing / on a source means the contents of auth, rather than auth itself, but I have been screwed by that one... it does not get all of the contents, and with --delete, has caused me disasters. rsync -avz defiance::auth/* /var/www/auth will also work, if you DON'T have any .files in auth, and is handy if you don't own /var/www (doesn't matter if you're doing it as root). Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?" Brian Clark <brianj@fusionwerks.com> Sent by: rsync-admin@lists.samba.org 11/19/2001 10:24 AM Please respond to Brian Clark To: rsync@lists.samba.org cc: (bcc: Tim Conway/LMT/SC/PHILIPS) Subject: modules madness / ssh regardless of daemon Classification: I just installed rsync on two machines, I think I'm a complete moron, and I need a clue bat. The remote machine's /etc/rsyncd.conf (just for testing): use chroot = no log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock [auth] path = /var/www/auth comment = apache authentication files. read only = yes Then for a test, I fired up /usr/local/bin/rsync --daemon on the remote machine. On the local machine, I did: % rsync -avz -e ssh defiance:auth /var/www/auth root@defiance's password: receiving file list ... link_stat auth : No such file or directory done client: nothing to do FYI, /var/www/auth on the remote machine _does_ exist. So that obviously didn't work, but then I did this: % rsync -avz -e ssh defiance:/var/www/auth /var/www/auth root@defiance's password: receiving file list ... done created directory /var/www/auth auth/ auth/foo/ auth/bar/ auth/baz/ etc.... And it works. But this next part I don't understand.. I kill the rsync daemon on the remote host, then I try the above command line again on the local host and it works!? Say what?! By using ssh does it bypass the remote daemon altogether? Plus, `hosts access' doesn't work in my /etc/rsyncd.conf and using rsync as a daemon through inetd or xinetd doesn't even let me make a connection. It's like it's not reading /etc/rsyncd.conf -- I just don't get it. % rsync --version rsync version 2.4.6 protocol version 24 Written by Andrew Tridgell and Paul Mackerras -- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -------------- next part -------------- HTML attachment scrubbed and removed
You're fine. You can either use the rsyncd (defiance::auth), thus going to your rsyncd, or you can use -e ssh, using ssh as the remote transport. rsync -options -e ssh remotehost:/path/to/auth /path/to/auth/mirror. if you use the second version, the rsyncd.conf is irrelevant.... you don't have to relate a path as a named module... you just use the path... period. Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?" Brian Clark <brianj@fusionwerks.com> Sent by: rsync-admin@lists.samba.org 11/19/2001 11:50 AM Please respond to Brian Clark To: rsync@lists.samba.org cc: (bcc: Tim Conway/LMT/SC/PHILIPS) Subject: Re: modules madness / ssh regardless of daemon Classification: Hi Tim, @ 1:40:43 PM on 11/19/2001, tim.conway@philips.com wrote: tcpc> -e ssh is for external transport. So is the single colon syntax tcpc> (defiance:auth) Use this cmdline: rsync -avz defiance::auth OK, I should have mentioned this earlier, and I forgot. I don't have rsh on [either] system because I've been told over and over that it's insecure (or was that something else?). Anyway, I think that's before my time, or maybe not. All I've ever know are telnet, then ssh, so that's what I immediately stuck to when rsync. I'm now wondering how I'm going to mirror anything unattended without having a valid ssh login/password in a file some where. On top of that, -e ssh renders rsyncd.conf useless (hosts access, auth users, etc.). :-\ -- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -------------- next part -------------- HTML attachment scrubbed and removed