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/
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 1 comment… read it below or add one }
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.