LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   server to server file transfers (https://www.linuxquestions.org/questions/linux-newbie-8/server-to-server-file-transfers-577555/)

nmrname 08-16-2007 09:59 AM

server to server file transfers
 
Being new to Linux I'm trying to transfer files from one server to another. What is the best way of doing this? I tried using the cp and mv command but cannot figure out how to designate the server name in the transfer. Any help would be greatly appreciated.

rwazar 08-16-2007 10:35 AM

cp and mv are for moving files locally. These could only be used if you mounted a share from the other server onto a local directory. Which, by the way wouldn't be a bad way of transferring files if you know how to set one up. Otherwise setting up an ftp server on the "to" server would probably be your best bet. Either that or a USB drive would be the simplest method if this was just a one time deal.

AlucardZero 08-16-2007 10:41 AM

no. use scp or rsync.

lord-fu 08-16-2007 10:54 AM

Agreed scp, this requires both machines have ssh installed (which any self respecting Linux distro will have)and configured. An example of a copy from one machine to another.

Code:

scp user@ip:/path/to/what/I/want /put/it/here/on/this/machine
hth

nmrname 08-16-2007 12:13 PM

Is this correct?
 
Quote:

Originally Posted by lord-fu (Post 2860989)
Agreed scp, this requires both machines have ssh installed (which any self respecting Linux distro will have)and configured. An example of a copy from one machine to another.

Code:

scp user@ip:/path/to/what/I/want /put/it/here/on/this/machine
hth

I want to move a file from the rcs1 server to my current location on rcs2 in dir /ibm_utils. Is this correct?

scp root@rcs1:/root/ibm_utils/ibm_dsa_rh4_i386.bin ibm_utils/

Thanks for all the help ... this forum is great. I'm a one man shop just trying to stay afloat.

MasterC 08-16-2007 12:38 PM

Yeah, that will work. The problem in your above example is the use of root. Being a one man shop, you are probably uniquely qualified to determine if allowing root over ssh is a good idea or not, but in general practice it's a nice saving feature to disable root over ssh. In your case, with a simple move, you could enable it, do your move, then disable it again, assuming you aren't moving stuff from one server to another every day. If that is the case, then you might want to consider using rsync instead and setting up 2 non-priv users to make the rsync arrangement.

Anyway, short answer, your above looks correct. If you don't need security for those specific transfers, ftp or rcp are also available.

-Chad

coolb 08-16-2007 12:44 PM

ftp, tftp, scp there are tones of ways todo this

MasterC 08-16-2007 01:02 PM

tftp would seem to be more difficult than ftp, scp, rsync or rcp? I guess it depends on what they are transferring and how often, to what servers, but tftp just seems like the wrong tool for this case. How would you suggest they use tftp in this situation?

-Chad


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