copy

limactl copy

Copy files between host and guest

Synopsis

Copy files between host and guest

Prefix guest filenames with the instance name and a colon.

Backends:
auto - Automatically selects the best available backend (rsync preferred, falls back to scp)
rsync - Uses rsync for faster transfers with resume capability (requires rsync on both host and guest)
scp - Uses scp for reliable transfers (always available)

Not to be confused with ’limactl clone’.

limactl copy SOURCE ... TARGET [flags]

Examples


  # Copy file from guest to host (auto backend)
  limactl copy default:/etc/os-release .

  # Copy file from host to guest with verbose output
  limactl copy -v myfile.txt default:/tmp/

  # Copy directory recursively using rsync backend
  limactl copy --backend=rsync -r ./mydir default:/tmp/

  # Copy using scp backend specifically
  limactl copy --backend=scp default:/var/log/app.log ./logs/

  # Copy multiple files
  limactl copy file1.txt file2.txt default:/tmp/

Options

      --backend string           Copy backend (scp|rsync|auto) (default "auto")
  -h, --help[=true|false]        help for copy
  -r, --recursive[=true|false]   Copy directories recursively
  -v, --verbose[=true|false]     Enable verbose output

Options inherited from parent commands

      --debug[=true|false]   Debug mode
      --log-format string    Set the logging format [text, json] (default "text")
      --log-level string     Set the logging level [trace, debug, info, warn, error]
      --tty[=true|false]     Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.
  -y, --yes[=true|false]     Alias of --tty=false

SEE ALSO

  • limactl - Lima: Linux virtual machines