Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: helin16 on September 18, 2006, 07:38:31 AM
-
hey, guys, I 've actually played with SME for while now, and I wanna to a create mirror server to my old one, performing like a backup but hourly. :roll:
but everytime I got my script running, it always ask me to input the password. and My script is like:
MASTER="192.168.1.10"
DIR="/"
LDIR="/"
SSH="/usr/bin/ssh"
export RSYNC_PASSWORD=XXXXX
rsync -avrR --links --rsh=$SSH $MASTER:$DIR $LDIR
and also, some part of the files could be backup, anyone can help?
-
If your doing this over ssh then you can use the concept of an ssh key to take care of business.
The ssh-keygen rsa or ssh-keygen dsa as the specific user you want to this to work as needs to be executed. Once you have your public and private keys created using that, you need to drop the ssh private key in /home/user/.ssh/authorized-keys
There are plenty of topics on this at google and one in particular that is an ibm white/paper redbook that shows you step by step.
Here is a pretty decent one - http://www.securitydocs.com/library/3385
Then you can execute your script and it will not ask for a pass ( this of course all happens within a secure ssh tunnel...nice!!).
Hope that helps. :wink:
Regards, Akash Chandrashekar
-
thanks a lot, it works!!!!
but there is another problem...after I'v run the script, it's still not a mirror of the original server...how can I mirror these two?