We know that if we give --progress parameter to rsync it will show the progress of files copied. But issue is that is shows the progress for each single file not total or overall progress.
So how to see the Total progress of files copied.
We know that if we give --progress parameter to rsync it will show the progress of files copied. But issue is that is shows the progress for each single file not total or overall progress.
So how to see the Total progress of files copied.
To see total progress with rsync
, the modern versions (from 3.1.0) has option --info=progress2
. rsync
must be running on the same machine as source files (or with NFS) for this to show sane values. Don't forget to supply -a
option too if you copy system directories.
-a
or -r
), the total progress can be misleading in rsync 3, as all nested files and subdirectories will only be discovered lazily/ad-hoc/during command execution. To get a complete estimate from the beginning, add the --no-inc-recursive
option.
As the comments say, the question has already been asked here.
So... short answer: you can't.
EDIT: you can now use the --info=progress2
option of rsync
to get an idea of overall progress (read the rest of my original answer if you are looking for an alternate progress indicator or for more info).
I'm quoting David Mackintosh:
There are no trivial ways to add a total progress indicator.
The reason for this is that when rsync looks at a list of files to sync, it doesn't know ahead of time which files will need to change. If you are doing delta transfers, the deltas themselves have to be calculated ahead of time to give a total picture of the work that needs to be done.
In other words, the easiest way to calculate how much work there is to be done is to actually do it.
But you can have a progress bar about the number of file transferred using pv
, if you already know how much you have, quoting zerodeux:
rsync -aix /source remote:/dest | pv -les $(df -i /source | perl -ane 'print $F[2] if $F[5] =~ m:^/:') >/dev/null
--info=progress2
option
Commented
Oct 15, 2014 at 10:24
rsync
to have a speed increase factor > 200
, which means that your progress indicator would go hundreds of times faster than expected, that is completely wrong... Except for saying that "60% of your files have been synchronized".