Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to transfer a directory with lots of small files (250k, avg size 5mb) from one server to another. Both run on Debian Linux. Is there a protocol that is recommendable regarding the transfer of large number of files?

share|improve this question
up vote 7 down vote accepted

You can tar the files and move the tar. Or pipe tar with SSH: see

Tar-ing the files deletes the overhead for each single file as the tarball is actually a single file.

If you can't untar/unzip on the other side (maybe because it's a shared hosting FTP) there's not much you can do.

share|improve this answer

rsync would certainly fit the bill here as well. Something like

server1$ rsync -av /your/directory server2:/destination/

It's an extremely flexible and powerful tool with many useful options. Run it with the -n flag first to see what it will do when trying to work out the correct syntax.

share|improve this answer

You do have an option if it's shared hosting and they offer sftp (which any good ones does) and use sshfs to mount the remote sever to your local system. You can then move the files as usual.

share|improve this answer

Your Answer


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.