Skip to main content
Clone an existing volume.

Signature

VastAI.clone_volume(
    source: int,
    dest: int,
    size: Optional[float] = None,
    disable_compression: bool = False
) -> dict

Parameters

source
int
required
id of volume contract being cloned
dest
int
required
id of volume offer volume is being copied to
size
Optional[float]
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.
disable_compression
bool
Do not compress volume data before copying.

Returns

dict

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.clone_volume(source=12345, dest=12345)
print(result)