---
title: "calicoctl datastore migrate import"
description: "Reference for the calicoctl datastore migrate import command in Calico Open Source, used to import resources into a Kubernetes datastore."
product: "Calico Open Source"
version: "3.33 (latest)"
section: "Reference"
canonical_url: "https://docs.tigera.io/calico/latest/reference/calicoctl/datastore/migrate/import"
---

# calicoctl datastore migrate import

This sections describes the `calicoctl datastore migrate import` command.

Read the [calicoctl Overview](https://docs.tigera.io/calico/latest/reference/calicoctl/overview.md) for a full list of calicoctl commands.

## Display the help text for 'calicoctl datastore migrate import' command

Run `calicoctl datastore migrate import --help` to display the following help menu for the command.

```text
Import resources from a YAML export into a Kubernetes datastore. Takes the
output of datastore migrate export and loads it into the Kubernetes-backed
datastore.

Usage:
  calicoctl datastore migrate import [flags]

Examples:
  calicoctl datastore migrate import -f datastore.yaml

Flags:
  -c, --config string     Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
  -f, --filename string   Filename to use to import resources.
  -h, --help              help for import

Global Flags:
      --allow-version-mismatch   Allow client and cluster versions mismatch
      --context string           The name of the kubeconfig context to use
  -l, --log-level string         Set the log level (panic, fatal, error, warn, info, debug) (default "panic")
```

### Examples

Import the contents of an etcdv3 datastore stored in a file named `etcd-migration`.

```bash
calicoctl datastore migrate import -f etcd-migration
```

### Options

```text
-f, --filename string   Filename to use to import resources.
```

### General options

```text
-c, --config string   Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
```

## See also

- [Install calicoctl](https://docs.tigera.io/calico/latest/operations/calicoctl/install.md)
- [Resources](https://docs.tigera.io/calico/latest/reference/resources/overview.md) for details on all valid resources, including file format and schema
