lima
lima copied to clipboard
`limactl copy` should use `rsync` instead of `scp` for copying a directory
Description
limactl copy should use rsync (present on macOS by default) instead of scp for copying a directory.
scp might be still faster for small directories, but probably the overhead is subtle.
https://github.com/lima-vm/lima/blob/eebc6847fb8f5d55e489fdc2948c6acafc2d5436/cmd/limactl/copy.go#L47
You could make it optional, like we ended up doing for docker-machine scp?
Usage: docker-machine scp [OPTIONS] [arg...]
Copy files between machines
Description:
Arguments are [[user@]machine:][path] [[user@]machine:][path].
Options:
--recursive, -r Copy files recursively (required to copy directories)
--delta, -d Reduce amount of data sent over network by sending only the differences (uses rsync)
--quiet, -q Disables the progress meter as well as warning and diagnostic messages from ssh
(my suggestion was --rsync, since it does has some rather tricky semantics)
Main reason is that it would require to install rsync on the guest as well...
@AkihiroSuda Can I work on this?
I found that I had to add --progress, to make the rsync output more similar to scp default output:
https://github.com/lima-vm/lima/pull/2028/commits/a63be723430d03a1c644a85986d6cc97d5b83dd6