Koozali.org: home of the SME Server

rsync between sme servers

stanley

rsync between sme servers
« on: August 30, 2002, 04:18:39 AM »
Hi, I have two sme servers, and need to keep 1 folder updated.  how would I keep this directory updated with rsync?  is there a how to, or simple explanation i can follow?

Jeff Coleman

Re: rsync between sme servers
« Reply #1 on: August 30, 2002, 06:27:35 AM »
Take a look at:

http://www.ifost.org.au/~peterw/

Unison is geat and there are server-manager panels that will let you automate the process.  Make sure to get the SSHKeys rpm as well.

Cheers,

-jeff

stanley

Re: rsync between sme servers
« Reply #2 on: August 30, 2002, 08:07:54 AM »
it says page cannot be displayed?

Dean Mumby

Re: rsync between sme servers
« Reply #3 on: August 30, 2002, 10:23:56 AM »
rsync -e ssh -avzP /some/directory user@remote:/some/diectory
then enter the password.

Alternatively set up rsa keys ( man ssh-keygen)
and place the public key on the remote host in .ssh/authorized_keys

then use rsync -e "ssh -1" /some/directory user@remote:/some/directory then you wont have to use passwords.

Have fun
Dean

Jeff C

Re: rsync between sme servers
« Reply #4 on: August 30, 2002, 06:27:44 PM »
I just tried the unison link again and it worked for me....

http://www.ifost.org.au/~peterw/

-jeff

Garret

Re: rsync between sme servers
« Reply #5 on: September 01, 2002, 08:02:35 AM »
Hey Jeff,

The Unison looks great to me, I installed fine but get an error when trying to send my key..

An error occurred trying to send the key at /etc/e-smith/web/panels/manager/cgi-bin/sshkeys line 272

Any help for this?

Both servers I've installed on are giving the same error.

Thanks

Garret
Ruffdogs

Jeff C

Re: rsync between sme servers
« Reply #6 on: September 01, 2002, 07:55:44 PM »
Garrett,

I have to admit that I have had mixed results with the sshkeys panel, but I have never had a problem with Unison.  

Worse comes to worse, follow the instructions in the Unison howto to manually create and copy the keys.

This has worked every time for me.

-jeff

Garret

Re: rsync between sme servers
« Reply #7 on: September 01, 2002, 08:15:27 PM »
Thanks. I'll try.

Dean Mumby

Re: rsync between sme servers
« Reply #8 on: September 01, 2002, 08:20:10 PM »
I am getting the same error
I have emailed the author and will report if he gets back to me.

Regards
Dean

Garret

Re: rsync between sme servers
« Reply #9 on: September 01, 2002, 08:51:21 PM »
I have gotten rid of the error by following the how-to, and I am able to set the sync in the manager. I click on "sync now" and it tells me the ibay has been updated . . . but in reality it has not. Any help?

Garret

guestHH

Re: rsync between sme servers
« Reply #10 on: September 01, 2002, 10:01:42 PM »
Garret,

Try to establish a ssh connection manually firts, and then try sending the keys.

Maybe it helps.

Regards,
guestHH

Garret

Re: rsync between sme servers
« Reply #11 on: September 01, 2002, 11:52:38 PM »
Thanks,

I did the manual transfer of the key and it worked fine (although I will try establishing the connection first for round two of testing). Right now the problems is that unison is telling me it has done the syncing file transfer, but in reality no files have been tranfered.

Garret

Re: rsync between sme servers
« Reply #12 on: September 02, 2002, 06:16:08 PM »
Still looking for help with the ibay snycing itself.

tomv

Re: rsync between sme servers
« Reply #13 on: September 06, 2002, 03:48:13 AM »
Can anyone point me to the howto please

Jáder Marasca

Re: rsync between sme servers
« Reply #14 on: September 16, 2002, 11:50:28 PM »
Jeff!

I'm sorry to reopen a closed thread...

I discoved this thread by search and was able to follow the Peter page to get unison working on SME 55 but on SME512 I got an error claiming about expect dependencies and was unable to find the files pointed by Peter on this page!
I found all modules but with version a little more updated and I think this is the problem!

Could you please send me the expect dependencies files as attachments to jader@igor.homelinux.net ? I think it's just a couple of MBs! :-)
I'm ADSL 256/128 here so it's no problem! But if it's to you, please point a link to me and I'll get them there! I'd tried rpmfind.net and his french version but just new versions there!

Thanks!

Jáder

Peter Werner

rsync between sme servers
« Reply #15 on: February 01, 2004, 11:49:04 PM »
hi guys

nice to see people are using this, unfortunately its starting to get very out of date.

it should work with any recent version of expect. if you're having trouble finding the dependencies, just try with whatever  version of expect you find.

i have no idea why it would be saying it has updated when it hasnt.

a howto is here
http://www.star-support.com/sme/Linux-HA/SME%20High%20Availability%20How-To.html

cheers
-pete
http://www.ifost.org.au/~peterw/

Mick

rsync between sme servers
« Reply #16 on: February 02, 2004, 02:25:38 PM »
And they say that the command line is hard! :-)

Really, setting up a cronjob to run rsync over non-interactive ssh is pretty straightforward, the tools are all already there, just a little typing required ...

Lets assume root is going to do this:

1. On Machine1 as root, run 'ssh-keygen -t rsa'
2. Accept default filename (id_rsa.pub) and DONT add a passphrase.
3. Copy the resulting public key (.ssh/id_rsa.pub) to root@machine2:/root/.ssh/authorized_keys by whatever means necessary.

That's about it really, you should now be able to login in to machine2 from machine 1 without a password using ssh

Then, something like this works for me run in a shell script as a cronjob:

rysync -e ssh -a --delete /source/dir destination/dir

Maybe check if you want those exact options (eg --delete), but that's all there is to it. Beats too much grief over RPMs and stuff.

loveless

this might help
« Reply #17 on: February 02, 2004, 10:22:52 PM »

Kevin

rsync between sme servers
« Reply #18 on: February 04, 2004, 09:58:21 PM »
Pay Stephen Noble $33.00(US) and you get a very elegant complete solution.

http://www.dungog.net/sme/products.php