LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 05-01-2007, 11:52 AM   #1
penguinpages
Member
 
Registered: Apr 2007
Posts: 46

Rep: Reputation: 15
RSYNC Automatic sync script


I wanted to setup a script which I can fire off via cron job or with shell script which will sync my /home to a remote server. I will post some documentation on how to do this. At this time here are my notes with the error listed below:


1) Setup automatic ssh login for rsync scripts
a) Get automatic ssh login working:http://www-128.ibm.com/developerworks/library/l-keyc2/
1] install KeyChain 'yum install keychain'
2] add entry to ~/.bash_profile
#example ~/.bash_profile file
/usr/bin/keychain ~/.ssh/id_rsa
#redirect ~/.ssh-agent output to /dev/null to zap the annoying
#"Agent PID" message
source ~/.ssh-agent > /dev/null
3] generate dsa and rsa keys: 'ssh-keygen -t dsa' 'ssh-keygen -t rsa'
4] Generate file to avoid error in keychain: 'touch ~/.ssh-agent' ???? Don't see this in notes.. but error went away.
b) Create rsync script
1] use 'source ~/.ssh-agent' to ensure that the cron job utilizes your keychain keys. ?? need this in script called by cron
2] create /etc/rsync.conf
# Global settings go here
use chroot = yes
max connect = 20
#syslog facility = local5
#pid file = /var/run/rsyncd.pid
# rsync 'module' options go here

[user]
path = /home/user/
comment = Home RSYNC Export
uid = user
gid = user
read only = no
4) Start rsync on server 'rsync --daemon'
5) run the client end of the command 'rsync -avz --stats --progress /home/user/directory/ root@remoteserver::user'
6) this will only copy updates from the local host /home/user directory
* Note: Changes on the remote host will not be evaluated or in anyway synced back to the local system



Issues:
I can't seem to get remote login to work I followed the instructions but I seem to be missing a piece of the puzzle. It use to be you just copied over your local .ssh/id_dsa.pub file into the remote server ~/.ssh/authorized_keys2 file and it worked... but it has been a number of years sense I have been in the trenches with linux (still getting back into the groove).

Reviewing my notes on the ssh setup... what did I do wrong?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic rsync mirroring fears RodWC Linux - General 3 07-17-2006 12:04 AM
Automatic rsync restart when dynamic IP changes joma Slackware 6 04-19-2006 05:50 AM
rsync script twantrd Programming 2 01-06-2005 05:46 AM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
Automatic Script micray Linux - Newbie 1 05-11-2002 04:53 PM


All times are GMT -5. The time now is 06:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration