Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: stanley 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?
-
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
-
it says page cannot be displayed?
-
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
-
I just tried the unison link again and it worked for me....
http://www.ifost.org.au/~peterw/
-jeff
-
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
-
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
-
Thanks. I'll try.
-
I am getting the same error
I have emailed the author and will report if he gets back to me.
Regards
Dean
-
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
-
Garret,
Try to establish a ssh connection manually firts, and then try sending the keys.
Maybe it helps.
Regards,
guestHH
-
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.
-
Still looking for help with the ibay snycing itself.
-
Can anyone point me to the howto please
-
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
-
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/
-
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.
-
http://www.tech-geeks.org//contrib/loveless/rsync_backup/
-
Pay Stephen Noble $33.00(US) and you get a very elegant complete solution.
http://www.dungog.net/sme/products.php