≡ Menu

Linux / Unix: Rsync Resume Partially Downloaded Files

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 user@server1.cyberciti.biz:/path/to/file /path/to/dest

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

rsync -avP user@server1.cyberciti.biz:~/Downloads/centos.iso ~/Downloads/
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 2 comments… add one }
  • Brian July 18, 2012, 11:56 pm

    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.

  • youcef January 14, 2015, 11:14 am

    Thank you. it works great :)

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , ,