Rsync Progress: A Comprehensive Guide

rsync progress

Rsync is a popular file synchronization tool that is used to transfer files and directories between two or more systems. It is known for its speed, flexibility, and ability to transfer large files efficiently. One of the most important features of rsync is the ability to monitor the progress of a file transfer. In this article, we will explore how to use rsync progress and related concepts that can help you understand this feature better.

What is Rsync Progress?

Rsync progress is a feature that allows you to monitor the progress of a file transfer using rsync. It provides real-time information about the number of files transferred, the transfer rate, and the estimated time remaining for the transfer to complete. This feature is especially useful when transferring large files or directories, as it allows you to track the progress of the transfer and estimate when it will be completed.

How to Use Rsync Progress

To use rsync progress, you need to include the --progress option when executing the rsync command. Here is an example:

rsync --progress -avz source/ destination/

In this example, the --progress option enables the progress display, while the -avz options enable archive mode, verbose output, and compression, respectively. The source/ and destination/ parameters specify the source and destination directories, respectively.

When you execute this command, rsync will display the progress of the transfer in real-time, as shown below:

sending incremental file list
file1.txt
     10,000,000   5%  100.00kB/s    0:10:00
file2.txt
     20,000,000  10%  200.00kB/s    0:05:00
file3.txt
     30,000,000  15%  300.00kB/s    0:03:20
file4.txt
     40,000,000  20%  400.00kB/s    0:02:30
file5.txt
     50,000,000  25%  500.00kB/s    0:02:00
file6.txt
     60,000,000  30%  600.00kB/s    0:01:40
file7.txt
     70,000,000  35%  700.00kB/s    0:01:25
file8.txt
     80,000,000  40%  800.00kB/s    0:01:15
file9.txt
     90,000,000  45%  900.00kB/s    0:01:06
file10.txt
    100,000,000  50%    1.00MB/s    0:01:00

In this output, you can see the name of each file being transferred, the size of the file, the percentage of the transfer completed, the transfer rate, and the estimated time remaining for the transfer to complete.

Other Rsync Progress Options

In addition to the --progress option, rsync also provides other options that can be used to customize the progress display. Here are some of the most commonly used options:

  • --stats: This option provides a summary of the transfer statistics after the transfer is complete. It includes the number of files transferred, the total size of the transferred files, and the transfer rate.
  • --human-readable: This option formats the output in a human-readable format, using units such as bytes, kilobytes, and megabytes.
  • --no-o: This option disables the display of the rsync output, which can be useful if you want to redirect the output to a file or another command.
  • --info=progress2: This option provides a more detailed progress display, including the transfer rate, the estimated time remaining, and the percentage of the transfer completed for each file.

Here is an example of using the --info=progress2 option:

rsync --info=progress2 -avz source/ destination/

This command will display a progress display similar to the one shown above, but with additional information about the transfer rate and estimated time remaining.

Conclusion

Rsync progress is a powerful feature that allows you to monitor the progress of a file transfer in real-time. By including the --progress option when executing the rsync command, you can track the number of files transferred, the transfer rate, and the estimated time remaining for the transfer to complete. In addition, rsync provides other options that can be used to customize the progress display and provide more detailed information about the transfer. By mastering this feature, you can use rsync more effectively and efficiently in your daily work.