Using --files-from with a pipe
Martin Schwenke
martin at meltin.net
Thu Apr 30 07:47:15 GMT 2009
I'd like to use the --files-from option with a pipe - either a named
pipe or in a pipeline where rsync reads from stdin.
The problem is that --files-from seems to tell rsync to read until
EOF, construct the file list, transfer files and then terminate. The
fact that there's only 1 rsync process on the source end seems to
confirm this.
--files-from probably pre-dates the fairly recent incremental
file-list transmission feature by a couple of years, so reading
incrementally from a pipe probably wasn't considered when --files-from
was implemented... because it wouldn't have been possible.
So, can someone who knows the code please guestimate whether it would
be easy to "fix" rsync so that --files-from can read from a pipe and
use the incremental file-list stuff to transfer whatever files who's
names it can read between each time reading from the pipe blocks? I
guess this would mean that it would have to read one filename at a
time and process it. So, would that be easy?
If the answer is "easy" then I'll have a go at implementing it... :-)
peace & happiness,
martin
More information about the rsync
mailing list