Estimate progress while rsync scans from the last backup's file count
With incremental recursion rsync only knows the total near the end, so the bar showed no ETA for most of the backup. Save the file count as a third line of the state file and use it as an estimate until rsync reports the real total.
This commit is contained in:
+6
-3
@@ -108,8 +108,9 @@ Don't use systemd journal for logging.
|
||||
.B \-\-no\-progress
|
||||
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 bar shows \(aq(scanning)\(aq, and the percentage
|
||||
and estimated time are only approximate.
|
||||
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.
|
||||
.TP
|
||||
.B \-\-rsync\-options OPTIONS [OPTION...]
|
||||
By default, the following rsync options are used:
|
||||
@@ -227,7 +228,9 @@ Bad configuration file or options (for example, only one of SSH host and SSH use
|
||||
Written after each successful backup (local or remote), replacing the previous one. The first line
|
||||
is the completion time in ISO 8601 format with the UTC offset (for example
|
||||
\(aq2026\-10\-25T14:03:12+02:00\(aq), the second line the backup directory (prefixed with
|
||||
\(aquser@host:\(aq for remote backups). The default location is
|
||||
\(aquser@host:\(aq for remote backups), and the third line, if present, the number of files, used
|
||||
for the progress bar estimate (only counted when the progress bar is shown, otherwise the previous
|
||||
count is kept). The default location is
|
||||
\fI~/.local/state/simple_backup/last_backup\fR. When running as root with sudo, doas or \-\-user,
|
||||
the file is written to that user\(aqs \fI~/.local/state\fR and owned by them. Useful for scripts
|
||||
that remind you when a backup is overdue.
|
||||
|
||||
Reference in New Issue
Block a user