How to transfer files from one site to another with FXP

FTP stands for File Transfer Protocol, the standard way to upload files to and download files from your web server, on the back end. FXP (File Exchange Protocol) is FTP's cooler cousin, allowing you to move files from one web server to another directly without having to download the files from one server and upload to another. This can save a considerable amount of time when dealing with large amounts of data.

The downside to FXP is that it can be a security risk when enabled, commonly used for illegal software transfers across the Internet. Therefore there may be a couple of extra steps to enable FXP on your web server, as by default it is disabled on FTP server software.

Step 1 - Determine the status of FXP on your servers

Most FTP clients show you the raw commands as they are sent to the server, especially when logging in. Look for the "Transfer Window" or "Log Window" on your FTP client. This is what is shown when logging into hosthow.com:

[R] Connecting to hosthow.com -> DNS=hosthow.com IP=72.52.252.78 PORT=21
[R] Connected to hosthow.com
[R] 220---------- Welcome to Pure-FTPd [TLS] ----------
[R] 220-You are user number 1 of 50 allowed.
[R] 220-Local time is now 08:27. Server port: 21.
[R] 220 You will be disconnected after 15 minutes of inactivity.
[R] USER how
[R] 331 User how OK. Password required
[R] PASS (hidden)
[R] 230-This server supports FXP transfers
[R] 230 OK. Current restricted directory is /

The items in bold are the key ones we are looking for: Pure-FTPd is the FTP server software, and the second item tells us that FXP is supported (which means it is enabled).

Step 2 - Enable FXP on both FTP servers, if needed

If you can't see the line that indicated that FXP is enabled, visit the website of your FTP server for details on enabling it. In the case of PureFTPd, you need to change the line "AllowUserFXP" to "Yes" in pure-ftpd.conf

Editing pure-ftpd.conf

After any changes to settings like these, you'll need to restart your FTP server, and while in the shell you can type the following to do so:

service pure-ftpd restart

or you can use the Restart Services option in WHM:

WHM - Restart Services

Remember that FXP must be enabled on both servers in order to work properly.

Step 3 - Log into both FTP servers and prepare to transfer files

Because of its insecure nature, many FTP severs will only do FXP using a secure (SSL or TLS) connection. To enable this, go to the "Site Manager" in your FTP program and change the settings for both the FTP connections.

FTP with SSL

Once this is done, you need to log into both servers at the same time. In the FTP program FlashFXP, this is shown with one site on each side of the program window.

Step 4 - Simply drag and drop to start your FXP transfer

In most programs you'll only have to drag and drop the file(s) to the other site's window. Sometimes you may need to right-click and select "Site to Site Transfer".

FXP Drag & Drop

Your logs will look something like this:

[R] CWD /server2
[R] 250 CWD command successful.
[R] PWD
[R] 257 "/server2" is current directory.
[R] PROT C
[R] 200 Protection set to Clear
[L] PASV
[L] 227 Entering Passive Mode (208,36,222,4,224,119)
[R] PORT 208,36,222,4,224,119
[R] 200 PORT command successful.
[R] STOR index.htm
[R] 150 Opening ASCII mode data connection for index.htm.
[L] RETR index.htm
[L] 150 Accepted data connection
[L] 226-File successfully transferred
[L] 226 0.011 seconds (measured here), 78.84 Kbytes per second
Transferred: index.htm 897 bytes in 0.52 seconds (1.7 KB/s)

The [R] and [L] are left and right windows - you can see one side is RETReaving the file, and the other is STORing it.

Remember: You have to keep your FTP program for the entire transfer! This is Site to Site, but your computer is executing the commands to transfer the files.

By:Henry | Filed under:Miscellaneous, Web Hosting Biz | Tags: ,

What Next?

Latest HostHow Activity

Leave a Reply