I have a long-running
rclone sync command, and I want to be able to view real-time progress in the terminal while also logging progress to a file. Although combining
--progress flags almost does what I want, I have not been able to find a way to periodically log stats to file in addition to displaying in the terminal.
I want to show progress in the terminal updated every 0.5s and log stats to file every 60s. I tried this set of flags:
rclone sync -v --log-file rclone.log --stats 60s --progress [...]
However, with these flags the terminal progress interval is set to 60s, while stats are still not logged to file at all. It appears that the
--progress flag supersedes normal stats logging.
If there is currently no way to have stats both displayed in the terminal and written to the logs, I'd like to propose this as a new feature. The basic requirements are:
- Provide a way to enable both progress and stats logging at the same time
- Provide a way to specify separate intervals for progress and stats logging
- Preserve backward compatibility with the current behavior
One solution would be to add a new
--progress-interval duration flag to specify the progress interval. If both
--stats are given then progress is both displayed in the terminal and written to logs at the respective intervals.
With this hypothetical flag, I could achieve the desired behavior for my use case with:
rclone sync -v --log-file rclone.log --stats 60s --progress-interval 5s [...]