View previous topic :: View next topic |
Author |
Message |
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Tue Jul 20, 2004 9:10 pm Post subject: rsync setup: use rsyncd or not? |
|
|
I have two computers which have a few directories that I want to keep in sync. The guides I've read all seem to use the rsync daemon "rsyncd". I read the manpages and found that I can do rsync from the command line without the daemon:
Code: |
$ rsync -avz remote.machine.net:/some/dir/ /some/dir
|
So should I use the daemon or not? |
|
Back to top |
|
|
curtis119 Bodhisattva
Joined: 10 Mar 2003 Posts: 2160 Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.
|
Posted: Tue Jul 20, 2004 9:17 pm Post subject: |
|
|
The daemon is good if you have a filesystem that changes a lot and needs to stay in sync. If you just need to replicate files every once in a while I would just put the rsync command line in a script and make it executable. Just use it when you need it. _________________ Gentoo: it's like wiping your ass with silk. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Tue Jul 20, 2004 10:38 pm Post subject: |
|
|
If I use the daemon on the server machine, I still need to execute the rsync command myself, even if it's only periodically. As far as I can tell, there's really no difference from the client side. Is one method better than the other? |
|
Back to top |
|
|
curtis119 Bodhisattva
Joined: 10 Mar 2003 Posts: 2160 Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.
|
Posted: Tue Jul 20, 2004 11:26 pm Post subject: |
|
|
Sorry I wasn't very clear in my first post. That's what I get for not proofreading!
You can put your rsync client script in a cron job to automate it. That way it always stays in sync with the rsync server. The server must have the rsync daemon running or started from within a shell or console. if you just need to use it every few weeks or so. you can ssh to the server machine start rsyncd, do the sync and then shut down rsyncd on the server and close the ssh session. Hope this is little more useful than the drivel I posted earlier _________________ Gentoo: it's like wiping your ass with silk. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Jul 21, 2004 4:12 am Post subject: |
|
|
We do it by setting up host keys between machines. Then the cron look like
Code: |
rsync -av -e ssh /local/path/ user@host:/remote/path/
|
The whole thing happend over ssh and there is not reason to run rsyncd on either server.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Wed Jul 21, 2004 6:03 pm Post subject: |
|
|
kashani wrote: | We do it by setting up host keys between machines. Then the cron look like
Code: |
rsync -av -e ssh /local/path/ user@host:/remote/path/
|
The whole thing happend over ssh and there is not reason to run rsyncd on either server.
kashani |
Got it. So in terms of security, would you say that going through ssh is more secure since we don't have to open up another port for the rsync daemon? |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Jul 21, 2004 6:50 pm Post subject: |
|
|
That's the way we feel about it. Also there have been at least 2 serious bugs in the rsync daemon in the past year IIRC. You sacrifice some speed, but don't have to deal with yet another service you'll need to secure.
I have noticed some speed increases by setting blowfish to be the default crypto since it's easier on the CPU.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|