---
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.32 (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
Usage:
  calicoctl datastore migrate export [--config=<CONFIG>]

Options:
  -h --help                 Show this screen.
  -c --config=<CONFIG>      Path to the file containing connection
                            configuration in YAML or JSON format.
                            [default: /etc/calico/calicoctl.cfg]

Description:
  Export the contents of the etcdv3 datastore.  Resources will be exported
  in yaml and json format. Save the results of this command to a file for
  later use with the import command.

  The following resources are exported:

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

  The following resources are not exported:

    - WorkloadEndpoints
    - Profiles
```

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