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

# calicoctl datastore migrate export

This sections describes the `calicoctl datastore migrate export` 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 export' command

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

```text
Export the contents of an etcdv3 datastore to YAML. This is the first step in
migrating to a Kubernetes datastore; feed the output into datastore migrate
import.

Usage:
  calicoctl datastore migrate export [flags]

Examples:
  calicoctl datastore migrate export > datastore.yaml

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

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

### Exported resources

The `export` subcommand exports the following Calico resources:

- IPPools
- BGPPeers
- GlobalNetworkPolicies
- GlobalNetworkSets
- HostEndpoints
- KubeControllersConfigurations
- NetworkPolicies
- Networksets
- Nodes
- BGPConfigurations
- FelixConfigurations
- IPReservations
- BGPFilters

The `export` subcommand does not export the following resources since they should be generated:

- WorkloadEndpoints
- Profiles

### Examples

Export the contents of an etcdv3 datastore to a file named `etcd-migration`.

```bash
calicoctl datastore migrate export > etcd-migration
```

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