> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai take snapshot

Schedule a snapshot of a running container and push it to your repo in a container registry

## Usage

```bash theme={null}
vastai take snapshot INSTANCE_ID --repo REPO --docker_login_user USER --docker_login_pass PASS[--container_registry REGISTRY] [--pause true|false]
```

## Arguments

<ParamField path="instance_id" type="string" required>
  instance\_id of the container instance to snapshot
</ParamField>

## Options

<ParamField path="--container_registry" type="string" default="docker.io">
  Container registry to push the snapshot to. Default will be docker.io
</ParamField>

<ParamField path="--repo" type="string">
  repo to push the snapshot to
</ParamField>

<ParamField path="--docker_login_user" type="string">
  Username for container registry with repo
</ParamField>

<ParamField path="--docker_login_pass" type="string">
  Password or token for container registry with repo
</ParamField>

<ParamField path="--pause" type="string" default="true">
  Pause container's processes being executed by the CPU to take snapshot (true/false). Default will be true
</ParamField>

## Description

Takes a snapshot of a running container instance and pushes snapshot to the specified repository in container registry.

Use pause=true to pause the container during commit (safer but slower),
or pause=false to leave it running (faster but may produce a less safe snapshot).

## 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`) |
