vers copy
Copy files between your local machine and a Vers VM using SCP.Usage
Options
| Option | Description |
|---|---|
-r, --recursive | Recursively copy directories and their contents |
Examples
Upload a file to a VM
Download a file from a VM
Use HEAD VM for file transfer
Copy directories recursively
How it works
Thecopy command automatically handles the complexities of file transfer:
- VM validation: Ensures the target VM is running and has SSH access
- SSH key management: Creates or retrieves the appropriate SSH key for the VM
- Network routing: Determines the correct connection method (direct IP or through cluster node)
- Transfer direction: Auto-detects whether you’re uploading or downloading based on path patterns
Path detection
- Local paths: Don’t start with
/or exist on your local filesystem - Remote paths: Start with
/(absolute paths on the VM) - Auto-detection: If a local file exists, the command assumes upload; otherwise, it assumes download
Prerequisites
- VM must be in “Running” state
- VM must have SSH port configured
- Valid authentication (handled automatically)
See Also
- vers connect - SSH into a VM interactively
- vers execute - Run commands on a VM
- vers status - Check VM state