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             help for copy
  -r, --recursive        Copy directories recursively
  -v, --verbose          Enable verbose output

Options inherited from parent commands

      --debug               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                 Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.
  -y, --yes                 Alias of --tty=false

SEE ALSO

  • limactl - Lima: Linux virtual machines