clustershell
clustershell copied to clipboard
rsync for file copy
The current copy and rcopy functions use scp. This is fine for small payloads. However for larger payloads that rarely change rsync is faster and uses less bandwidth.
Would it be possible to add an -rsync and -rrsync option that uses rsync instead of scp?
Copy command with ClusterShell was developed as a convenient to copy small files or small payload. Intent is not the develop a very fast remote copy tool. There is already plenty of them available.
However, depending on what you want to do, there is already some possibilities. The easier one is probably to start working with exec
feature. Before implementing any additional command launching, first, try to test it.
$ clush -R exec -w targetnodes[1-100] "rsync -av /my/source/files %host:/tmp"
This will start, on current node, a rsync command for each target specified with -w
, replacing %host
placeholder by the target name. See documentation of man page for more details.
As I was using clush anyway I was hoping not to have to use another too or start inventing any more wheels. It is worth asking for the record.
Thanks for your suggestion; I'll give it a try.