> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Export to archive

> Pack a dataset's images, with their annotations, into zip archives you download from the node.

## Overview

Packs a dataset's images, and their annotations, into zip archives laid out in the format you pick. After the run, **Download** on the node saves the archive to your computer.

A large dataset is split into parts of about 2 GiB each. Every part is a regular zip that opens on its own. To export into a bucket instead, use [Export to cloud storage](/node-library/nodes/export-ops-export-to-cloud-storage).

```mermaid
flowchart LR
  n1["Dataset"] --> n2["Export to archive"] --> n3["Zip archives to download"]
```

## Prerequisites

| Requirement             | What you need                                             |
| ----------------------- | --------------------------------------------------------- |
| **Dataset with images** | An OvalBee dataset that already holds at least one image. |

## How it works

Reads the source dataset and confirms it holds at least one image.

Exports the images, and their annotations unless **With annotations** is off, laid out as **Annotation format**.

Writes the files into a zip. Once the zip reaches about 2 GiB, the node stores it and starts the next part.

Stores the last part. **Download** on the node then offers the archive, or a list of its parts.

## FAQ

#### What does each annotation format write?

**YOLO** writes `images/train`, `labels/train` and a `data.yaml` class list. **COCO** writes `images/train` and an `annotations/train.json`. **Supervisely** writes a project-level `meta.json` plus `<dataset>/img` and `<dataset>/ann` folders.

#### How do I use an export split into parts?

Extract every part into the same folder. Each part holds a share of the images. The files that describe the whole dataset, such as `annotations/train.json`, `data.yaml` or `meta.json`, are in the last part.

#### How do I export only the images?

Turn off **With annotations**. The node still writes the layout for the picked **Annotation format**, but skips every annotation file.

#### Why did the run fail?

The source dataset may have no images, or the worker may not have enough free disk for one 2 GiB part.

## Inputs

**`Dataset`** `dataset` — required

Dataset whose images are exported. Key: `DATASET`.

---

**`With annotations`** `boolean` — required, default: true

Export annotations next to the images. Turn off to export only the image files. Key: `WITH_ANNOTATIONS`.

---

**`Annotation format`** `select` — required, default: supervisely

Format the annotations are written in. Visible when `WITH_ANNOTATIONS` is not `False`. Key: `ANNOTATION_FORMAT`.

Options:

* Supervisely (`supervisely`)
* COCO (`coco`)
* YOLO (`yolo`)

---

## Outputs

**`Archive`** `string`

Asset holding the zip archives, one per 2 GiB part. Read by the download widget. Hidden from the flow editor. Key: `ARCHIVE`.

---

## JSON config

Machine-readable node interface for automation and advanced usage.

#### Show JSON

```json
{
  "name": "Export to archive",
  "description": "Pack a dataset's images, with their annotations, into zip archives you download from the node.",
  "category": "Export",
  "namespace": "ovalbee",
  "templateKey": "export_ops/export_to_archive",
  "version": "v1",
  "inputs": [
    {
      "key": "DATASET",
      "label": "Dataset",
      "type": "dataset",
      "description": "Dataset whose images are exported.",
      "required": true,
      "default": null,
      "visibleWhen": null
    },
    {
      "key": "WITH_ANNOTATIONS",
      "label": "With annotations",
      "type": "boolean",
      "description": "Export annotations next to the images. Turn off to export only the image files.",
      "required": true,
      "default": true,
      "visibleWhen": null
    },
    {
      "key": "ANNOTATION_FORMAT",
      "label": "Annotation format",
      "type": "select",
      "description": "Format the annotations are written in.",
      "required": true,
      "default": "supervisely",
      "visibleWhen": {
        "key": "WITH_ANNOTATIONS",
        "operator": "notEquals",
        "value": false
      },
      "options": {
        "options": [
          {
            "label": "Supervisely",
            "value": "supervisely"
          },
          {
            "label": "COCO",
            "value": "coco"
          },
          {
            "label": "YOLO",
            "value": "yolo"
          }
        ]
      }
    }
  ],
  "outputs": [
    {
      "key": "ARCHIVE",
      "label": "Archive",
      "type": "string",
      "description": "Asset holding the zip archives, one per 2 GiB part. Read by the download widget.",
      "artifact": false,
      "badge": false,
      "badgeOpens": null,
      "hidden": true
    }
  ],
  "widgets": {
    "widget": {
      "id": "dataset-download",
      "settings": {
        "assetId": {
          "type": "variable",
          "value": "self.outputs.ARCHIVE"
        }
      }
    }
  }
}
```