LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2008, 02:30 AM   #1
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Rep: Reputation: 15
remote copy


can you tell me the command through which i can copy my servers files to multiple servers.(except ftp)waiting for your reply..
 
Old 05-14-2008, 02:34 AM   #2
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Rep: Reputation: 16
You can use rsync, which has the ability to copy to multiple hosts parallely.

Thanks
 
Old 05-14-2008, 03:25 AM   #3
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Original Poster
Rep: Reputation: 15
thank you,

but can explain me with sample example,just to understand the syntax of this command.
 
Old 05-14-2008, 03:32 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You could also use scp (see man scp)

rsync is pretty simple (there are a lot of examples given in man rsync)

rsync -avt /home user@dest:/home

is one example.

Last edited by billymayday; 05-14-2008 at 03:34 AM.
 
Old 05-14-2008, 03:46 AM   #5
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Original Poster
Rep: Reputation: 15
thank you....its working ....
 
Old 05-14-2008, 03:54 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You'll find that rsync is really useful - it does incremental copying to really speed things up
 
Old 05-14-2008, 04:14 AM   #7
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Original Poster
Rep: Reputation: 15
rsync -avt /home user@dest:/home
can i add multiple user to copy the same file from the server..
i have read man page but it is too complex!!!!
so can you tell me..?
 
Old 05-14-2008, 06:44 AM   #8
harsshal
Member
 
Registered: Jul 2006
Location: New York, NY
Distribution: redhat,ubuntu,RHEL,fedora,centOS
Posts: 105

Rep: Reputation: 15
u can also use scp.

ex. scp -r /source user@comp:/dest.

-r if source is destination.

scp if creating completely new copy.rsync if updating a copy.
 
Old 05-14-2008, 07:38 AM   #9
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by nirmit View Post
can i add multiple user to copy the same file from the server..
I don't follow what you mean
 
Old 05-14-2008, 08:50 AM   #10
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
^ I think he wants to copy 1 file to multiple servers at the same time, or with the same command

I found this while googling. scp multiple servers

SERVERS="user1@box1 user2@box2 user3@box3"
for s in $SERVERS
do
scp file1 file2 ${s}:/path
done

if you have more than a few servers you can use this:

if you need to get more complicated than that, check out this thread I made. You'll have to adjust the scripts to fit your needs


http://www.linuxquestions.org/questi...ervers-640817/
 
  


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
Remote Secure Copy kalyanofb Programming 2 04-20-2007 07:32 AM
copy from local to remote yogaboy Linux - Networking 9 12-18-2006 01:49 AM
Putty : Remote copy HaPagan Linux - Software 3 01-03-2006 10:33 AM
remote copy help me. suguname Mandriva 6 01-27-2005 03:33 AM
copy from remote with ssh mehlkelm Linux - Networking 4 09-02-2004 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:04 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