I 'm working on a bash script to copy files from a single USB drive to multiple others.
I'm currently using rsync that copies from the source to a single destination, going through all of the output drives in a loop one at a time:
for line in $(cat output_drives_list); do rsync -ah --progress --delete mountpoints/SOURCE/ mountpoints/$line/ done
I'm trying to optimize the process to get maximum use of the USB bandwidth, avaiding the bottleneck of a single drive write speed.
Is is possible to do something like rsync, but with multiple output directories, that will write to all output drives at once, but read only once from the input?
I guess that some of this is already taken care of by the system cache, but that only optimizes for read.
If I run multiple rsync processes in parallel, this might optimize the write speed, but I'm also afraid it'll butcher the read speed.
Do I need to care about single-read when copying in parallel?