Skip to main content
Copy directories between instances and/or local

Usage

Arguments

src
string
required
Source location for copy operation (supports multiple formats)
dst
string
required
Target location for copy operation (supports multiple formats)

Options

-i
string
Location of ssh private key (alias: --identity)

Description

Copies a directory from a source location to a target location. Each of source and destination directories can be either local or remote, subject to appropriate read and write permissions required to carry out the action. Supported location formats:
  • [instance_id:]path (legacy format, still supported)
  • C.instance_id:path (container copy format)
  • cloud_service:path (cloud service format)
  • cloud_service.cloud_service_id:path (cloud service with ID)
  • local:path (explicit local path)
  • V.volume_id:path (volume copy, see restrictions)
You should not copy to /root or / as a destination directory, as this can mess up the permissions on your instance ssh folder, breaking future copy operations (as they use ssh authentication) You can see more information about constraints here: https://vast.ai/docs/gpu-instances/data-movement#constraints Volume copy is currently only supported for copying to other volumes or instances, not cloud services or local.

Examples

Global Options

The following options are available for all commands: