3 ms·
Adding pv to a tar|ssh pipeline is simpler than just passing -P to rsync? I must disagree.
by darkpuma 7y ago
Adding pv to a tar|ssh pipeline is simpler than just passing -P to rsync? I must disagree.
- klodolph 7y agoMaybe I wasn't clear about my complaint. My complaint is that rsync --progress sucks, I'm not complaining that it's hard to use.
- darkpuma 7y agoI don't like the --no-h change they made to the --progress format (mentioned in another comment) because it broke my parsing once, but otherwise I don't really see a problem with it and I expect most people have never tried to parse it. What's so bad about --progress? Edit: --progress also tells you how many files rsync has been told to sync, and of those, how many are remaining. 2384908 100% 57.52MB/s 0:00:00 (xfr#1, to-chk=7/11) e.g. transfer #1 out of 11 files or directories to check, with 7 remaining.
- klodolph 7y ago--progress gives you only the progress of individual file transfers.
- sirn 7y ago--info=progress2 actually gives you the progress of the whole transfer (but I don't think you can do both). You can use --info=name0,progress2 if you don't care about individual files scrolling the terminal.
- klodolph 7y agoSeems like this user-hostile interface could have been averted if they gave rsync a "porcelain" mode, since --progress is frozen so it doesn't break scripts.
- darkpuma 7y agoI think you're really exaggerating the severity of what is fundamentally just a minor matter of personal taste. (I say this as somebody who's written a GUI wrapper around rsync to, among other things, implement my own progress bar. So I agree with the general principle of writing porcelain around rsync.) (Incidentally --progress has actually changed in a way that breaks (my) scripts in the past; the version that ships with MacOS and the latest version exhibit different behavior by default. It would be nice if there was a better way. If rsync followed the ffmpeg model of foremost being a library with a standard command line interface, I think that could be ideal.)