Resume rsync file transfers

I did not know that rsync had the resume capability till last week when I had to transfer almost 200GB between two servers with no good connection. I think some context is needed here: My company has two servers in two different cities where the backups are stored. There is a daily syncronization between the backup tree between the servers. That is, a cron task that calls a script that basically runs rsync.

Due to the bad connection, I have had to add the -P option to the rsync command so that the command run by the cron task is:

$ rsync -rPtz -e ssh /local_backup_path/ remote_host:/remote_backup_path/

The -e ssh tells rsync to use a ssh client instead of rsh. The -z option compresses the file. -t preserves time attributes and the -P option resumes incomplete file transfers.

If you run this command from the command line you can use the --progress option, that will show you a progress bar during transfer. Very useful with large files.

I hope this saves you some time ;)

1 Comment

  • On 06.16.12 Jeff said:

    Thank you!!! I have been hunting around for a way to make rsync do this, and it’s built in!

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields