Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limactl copy should use rsync instead of scp for copying a directory #2198

Open
AkihiroSuda opened this issue Feb 9, 2024 · 3 comments
Open
Labels
area/cli limactl CLI user experience enhancement New feature or request good first issue Good for newcomers

Comments

@AkihiroSuda
Copy link
Member

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.

arg0, err := exec.LookPath("scp")

@AkihiroSuda AkihiroSuda added enhancement New feature or request good first issue Good for newcomers area/cli limactl CLI user experience labels Feb 9, 2024
@afbjorklund
Copy link
Contributor

afbjorklund commented Feb 9, 2024

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...

@ayushgml
Copy link
Contributor

ayushgml commented Mar 4, 2024

@AkihiroSuda Can I work on this?

@afbjorklund
Copy link
Contributor

I found that I had to add --progress, to make the rsync output more similar to scp default output:

a63be72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli limactl CLI user experience enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants