---
title: "tractorbeam import"
description: "Import an export into the Workspace."
sidebar:
  label: "import"
  order: 18
---

Import an export into a Workspace holding only its first Commit, and print the import's ID once it succeeds. Pass `--force` to replace what the Workspace holds instead, and `--file` to upload an archive downloaded from another Workspace or deployment first.

```sh
tractorbeam import [flags] <export>
```

| Argument | Description |
| --- | --- |
| `<export>` | The ID of the export to import. |

| Flag | Description |
| --- | --- |
| `--file <string>` | Upload the export's archive from this file first. Use it to import an export from another Workspace or deployment. |
| `--force` | Replace everything in the Workspace, even one with more than its first Commit. |
| `--config <string>` | The Project's `tractorbeam.config.ts`. Defaults to the one in the current directory or its nearest ancestor. |
| `--workspace <string>` | Workspace identifier or resource name. Environment variable: `TRACTORBEAM_WORKSPACE`. |
| `--origin <string>` | The Tractorbeam origin to call instead of the default, such as a proxy's. Environment variable: `TRACTORBEAM_ORIGIN`. |
| `--token <string>` | Access token. Defaults to the saved interactive session. Environment variable: `TRACTORBEAM_TOKEN`. |

Examples:

```sh
# Import an export of this deployment into an empty Workspace
tractorbeam import exp_01jz8k3m9qfx6t2v5w7y0a4bcd

# Upload an archive from another deployment and replace the Workspace's contents with it
tractorbeam import exp_01jz8k3m9qfx6t2v5w7y0a4bcd --file workspace.tar.zst --force
```
