> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai clone volume

Clone an existing volume

## Usage

```bash theme={null}
vastai clone volume <source_id> <dest_id> [options]
```

## Arguments

<ParamField path="source" type="integer" required>
  id of volume contract being cloned
</ParamField>

<ParamField path="dest" type="integer" required>
  id of volume offer volume is being copied to
</ParamField>

## Options

<ParamField path="-s" type="number">
  Size of new volume contract, in GB. Must be greater than or equal to the source volume, and less than or equal to the destination offer. (alias: `--size`)
</ParamField>

<ParamField path="-d" type="boolean">
  Do not compress volume data before copying. (alias: `--disable_compression`)
</ParamField>

## Description

Create a new volume with the given offer, by copying the existing volume.
Size defaults to the size of the existing volume, but can be increased if there is available space.

## Examples

```bash theme={null}
vastai clone volume <SOURCE> <DEST>
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
