Linux / Unix: Rsync Resume Partially Downloaded Files

last updated in Categories

I know wget command can resume downloads. H>ow do I resume partially transferred files using rsync command line under Unix like operating systems?

Yee, by default, the rsync command will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the --partial option tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster. The syntax is:

rsync -av --partial /path/to/file /path/to/dest
rsync -av --partial /path/to/dest

You can also use -P option for the same purpose. In this example, copy partially transferred file:

rsync -avP ~/Downloads/


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

2 comment

  1. One thing to note is that when using –partial, rsync will save the partial file with the final name of the file, but it will be truncated. The next time you run the rsync, that file will NOT appear to be getting updated. Rsync will make a copy of it with a temp file name that starts with a “.”. You can see the file by using “ls -a” in the same directory as your file. It will perform a checksum of each part of the local file and copy that chunk to the new file, then it will start getting the missing chunks from the remote server.

    This can be very confusing from an interface standpoint, since you will not see the original partial file get updated until the transfer is complete. You will also see the speed (if using –progress) appear to go really fast, but this is cause by the local file copy, not a sudden huge increase in your network bandwidth.

    Summary: using –partial is very helpful, but the feedback it provides can be confusing.

    Still, have a question? Get help on our forum!