LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2004, 03:30 PM   #1
cpgeorge
LQ Newbie
 
Registered: Apr 2004
Location: Norfolk, Ne
Distribution: RedHat 7 and 9
Posts: 12

Rep: Reputation: 0
Replicating files between servers.


I hope this is not a stupid question, I am still early in the learning stage. I am looking for advice on how to replicate files on a daily basis from SYSTEM A (Fedora core 2) to SYSTEM B (Red Hat 9). They are both on the same subnet and behind a firewall so security is not a high priority. I am just needing an easy, automated way to update some files on SYSTEM B with files from SYSTEM A daily. Thanks for any help anyone can provide.

George
 
Old 12-08-2004, 04:12 PM   #2
jymbo
Member
 
Registered: Jan 2003
Posts: 217

Rep: Reputation: 30
Rsync over ssh:

Code:
#rsync -e ssh -avzp --delete [/SYSTEM_A/dir] username_on_SYSTEM_B@SYSTEM_B:[/SYSTEM_B/dir]
Howto
 
Old 12-09-2004, 10:27 AM   #3
cpgeorge
LQ Newbie
 
Registered: Apr 2004
Location: Norfolk, Ne
Distribution: RedHat 7 and 9
Posts: 12

Original Poster
Rep: Reputation: 0
I think this is going to do the trick but I am running into another problem. We use a non standard port for SSH. When I use /usr/bin/rsync -e ssh -pXXXX -avzp /path/* server:/path/ I get the messege that rsync: -pXXXX: unknown option. How can I tell rsync that it needs to use a port other then port 22 when it sync's up?

Thanks for any additional help.
George
 
Old 12-09-2004, 10:31 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well the rsync manpage says to use the --port option to set the rsyncd port, but i would assume this would be the ssh port if it's over ssh.
 
Old 12-09-2004, 10:33 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, scratch that...

rsync -e 'ssh -p1234' ...
 
Old 12-09-2004, 10:56 AM   #6
cpgeorge
LQ Newbie
 
Registered: Apr 2004
Location: Norfolk, Ne
Distribution: RedHat 7 and 9
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks a lot. I got it to work. One day hopefully I will get to the point that I can start answering peoples questions :-).
 
Old 12-10-2004, 10:07 AM   #7
cpgeorge
LQ Newbie
 
Registered: Apr 2004
Location: Norfolk, Ne
Distribution: RedHat 7 and 9
Posts: 12

Original Poster
Rep: Reputation: 0
O.k. it works when I run it manually and can type the password in, but how to I get it to use the password when running from a cron? Again-- security is not a high priority-- both systems are on the same subnet and behind a firewall.

Here is what I am using.

/usr/bin/rsync -e 'ssh -pXXXX -l nabu' -avzp /named/RBL/* XXX.XXX.XXX.XXX:/named/RBL/


Thanks again for all your help
George
 
  


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
Quick way to transfer files using modems without servers detly Linux - Networking 3 07-07-2005 11:17 PM
Software needed for pushing files to ftp servers. Napper Linux - Software 6 04-02-2005 02:20 PM
one or two servers jeffpoulsen Linux - Networking 2 06-22-2004 07:43 AM
replicating the lycoris 'my linux system'? aesahaettr Linux - Distributions 2 04-29-2004 05:33 PM
Software for synchronizing files on web servers josephswagner Linux - Software 2 02-06-2003 12:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration