Keep the progress bar estimate when the last file count is exceeded

When a backup has more files than the last one, estimate the total from the files rsync has found so far,
capped at 99% until the scan ends, instead of falling back to "(scanning)".
This commit is contained in:
Fuxino
2026-11-14 11:08:21 +01:00
parent 68b6d77f30
commit 2c7233ce45
3 changed files with 33 additions and 10 deletions
+3 -2
View File
@@ -117,8 +117,9 @@ Don't use systemd journal for logging.
Don't show a progress bar while rsync copies the files. The progress bar is only shown when
the output is a terminal, so it never appears in the systemd journal or in redirected output.
While rsync is still looking for files, the percentage and estimated time (marked with
\(aq~\(aq) are based on the number of files in the last backup, or the bar shows
\(aq(scanning)\(aq if that is unknown or already exceeded.
\(aq~\(aq) are based on the number of files in the last backup (or on the files found so far,
once this backup has more), and stay below 100%. Without a previous count the bar shows
\(aq(scanning)\(aq instead.
.TP
.B \-\-rsync\-options OPTIONS [OPTION...]
By default, the following rsync options are used: