Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a tool which I can user to send files between two remote servers? For example, I have hosting at hostgator and I create a directory there. Then I use that tool to send files from some other remote storage to that directory.

I want to skip the step of downloading files to my computer and uploading it to another storage.

share|improve this question
    
Could look into something like dropbox. You can sync a folder between two computers, or three if you don't want to connect to each one. Though I don't know how viable this would be because I'm not sure of the policies you have about installing software on the servers. But it would work. –  Paperlantern Jan 13 '12 at 14:43
    
What kind of access do you have to the server? Shell access? Root access? –  sudo Jan 13 '12 at 14:45
    
@Dennis On hostgator hosting I have shell access, while other server is just a path access (direct URL). –  JoeM Jan 13 '12 at 14:59
    
@Paperlantern Dropbox cannot work as I cannot download remote files directly onto it –  JoeM Jan 13 '12 at 15:00
    
Do you want to move files from or to the hostgator server? How do you upload files to the other server? Web-based? FTP? –  sudo Jan 13 '12 at 15:00

3 Answers 3

up vote 2 down vote accepted

This can easily and securely be done using the SSH protocol. With PuTTY you can connect to your remote host with a shell and tranfer files using scp:

$ scp -r foo_dir user@foo.org:server_dir/

this will copy foo_dir from your connected server to another server foo.org into the directory server_dir there. To copy from foo.org to the connected server:

$ scp -r user@foo.org:server_dir/foo_dir ./
share|improve this answer
    
I will definitely try this tomorrow. –  JoeM Jan 13 '12 at 18:56
1  
@krondor Thanks for reminding me of user@. –  Herman Torjussen Jan 13 '12 at 21:35

*I don't have enough rep to comment, but reading your comments it's clear you have the following scenario.

  • Shell Access to one server
  • No Access other than URL to the other server

In this case I think your solution would be;

Wget

If you have the Wget command available to you from the Shell of the first server you can specify the URL to fetch the content from the second server. You can also pass parameters on what content you wish to get (or even fully mirror from the other system).

Lifehacker has a good write up on using Wget

Outside of Wget there are quite a few options depending on your host and host access.

Are the servers Linux (or Unix like)?

In the case of Windows RDP is an option. The RDP client can provide native file transfers between hosts. To initiate this you would RDP to one of the servers and then from that server RDP to the other server configuring file transfer options before hand.

To configure the file transfer abilities;

    Run the Remote Desktop Connection.
    Enter the IP address of the computer you want to connect to.
    Click Options and go to the Local Resources to Select the box for Disk Drives and connect/logon to the remote Windows computer.
    Open Windows Explorer. You'll notice additional hard drives (x on tsclient) that represent the hard drives on the local computer.
    Copy the files between the local and remote computer by dragging and dropping the files in Windows Explorer.

Rsync: Sync delta changes, supports compression, bandwidth throttling, works over SSH or client/daemon, cross platform (Windows Client/Server available). Rsync has a similar syntax to SCP, but with more bells and whistles on control of the copy.

Example:

    rsync -avz /folder1/ user@host2.example.com:/folder1/

SCP: Already mentioned in another answer. Works over SSH, supports compression and recursion.

Example:

    scp -r /folder1/ user@host2.example.com:/folder1/

In the case of both RSync and SCP you will need to shell into one of the servers to initiate the command. If you initiate the command from your workstation with both hosts specified (scp user@host1:/folder1 user@host2:/folder2) it will transfer through that workstation which is not what you want.

FXP:

Lastly (but not really recommended), you could use FTP's File eXchange Protocol (FXP) which is a subset of the FTP protocol to remotely initiate an FTP transfer between two servers. The file transferred would be direct from server to server and not to your initiating connection.

To do so would open you up to a security risk of an FTP Bounce Attack, however, and is usually discouraged. If that risk is acceptable for your purposes (maybe you can adequately firewall between both hosts), than in order to proceed you will need two things.

  1. An FXP compatible FTP server (Pure-FTPd works)
  2. An FXP compatible FTP client (FlashFXP is one)
share|improve this answer
    
A few edits mainly to add wget after reading your comments, add RDP when I saw the windows 7 tag, and correct a mistake I made on scp/rsync and where you would be running that from. –  krondor Jan 13 '12 at 20:56
    
+1 - Excellent answer that goes over all the options. –  afrazier Jan 13 '12 at 21:27

Create an FTP session. Are you allowed to FTP from HostGator to another source? For instance, on HostMonster I have multiple FTP session options including the ability to FTP from my Hostmonster account to another source (not just my local machine).

You should see the option in your cpanel.

share|improve this answer
    
I will check this up, but I am really not sure. Thanks for the idea. –  JoeM Jan 13 '12 at 18:57
1  
This requires the client and both servers to have "FXP" support enabled; most servers disable it due to security issues. –  grawity Jan 13 '12 at 21:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.