{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/reference/cli/redis-di-export",
  "title": "redis-di export",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-export/",
  "summary": "Exports a deployable pipeline configuration",
  "tags": [
    "redis-di"
  ],
  "last_updated": "2026-10-30T12:23:39+02:00",
  "page_type": "content",
  "content_hash": "13568ae559f54377d3aa8f502386bcfb8b25ca1cfa961aa4173630a4eb441a0f",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Exports the configuration of a deployed pipeline to a directory, as a `config.yaml` file and one\njob file per job in its `jobs` subdirectory, named after the job. You can edit the exported files\nand deploy them again with\n[`redis-di deploy`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-deploy),\nto the same pipeline or to another one.\n\nThe export contains secret references such as `${MYSQL_DB_PASSWORD}`, but no secret values, and\nthe secrets themselves stay with the pipeline. Before you deploy an export to another pipeline or\nto another RDI instance, set the secrets there with\n[`redis-di set-secret`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-set-secret).\n\nIf the directory already contains a configuration, the command asks for confirmation before it\nreplaces it, unless you pass `--force`. It replaces `config.yaml` and deletes the job files in\n`jobs` that do not belong to the exported pipeline, and it leaves other files alone."
    },
    {
      "id": "usage",
      "title": "Usage",
      "role": "syntax",
      "text": "[code example]\n\nThe pipeline name is an optional argument that defaults to `default`."
    },
    {
      "id": "options",
      "title": "Options",
      "role": "parameters",
      "text": "| Option    | Description                                                                 |\n| :-------- | :-------------------------------------------------------------------------- |\n| `--dir`   | Directory to export `config.yaml` and `jobs/*.yaml` to (default `.`).       |\n| `--force` | Replace an existing configuration in the directory without confirmation.    |\n\nThis command also accepts the\n[global options](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di#global-options)."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "usage-ex0",
      "language": "plaintext",
      "code": "redis-di export [pipeline] [flags]",
      "section_id": "usage"
    },
    {
      "id": "example-ex0",
      "language": "bash",
      "code": "# Export the configuration of the orders pipeline, then deploy it again after editing it\nredis-di export orders --dir ./orders\nredis-di deploy orders --dir ./orders\n\n# Copy the default pipeline to the RDI instance of the context named staging,\n# after setting its secrets there\nredis-di export --dir ./copy\nredis-di deploy --empty --context staging\nredis-di deploy --dir ./copy --context staging",
      "section_id": "example"
    }
  ]
}
