﻿---
title: stack kb saved-objects post-saved-objects-export cli command
description: Export saved objects Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4089/reference/elastic-cli/cli/stack/kb/saved-objects/post-saved-objects-export
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb saved-objects post-saved-objects-export cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb saved-objects post-saved-objects-export [options]
```

Export saved objects
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--exclude-export-details">
    Do not add export details entry at the end of the stream.
  </definition>
  <definition term="--has-reference string">
    **Repeatable:** pass `--has-reference` multiple times to supply more than one value
  </definition>
  <definition term="--include-references-deep">
    Includes all of the referenced objects in the exported objects.
  </definition>
  <definition term="--objects string[]">
    A list of objects to export. NOTE: this optional parameter cannot be combined with the `types` option
    **Repeatable:** pass `--objects` multiple times to supply more than one value
  </definition>
  <definition term="--search string">
    Search for documents to export using the Elasticsearch Simple Query String syntax.
  </definition>
  <definition term="--type string">
    The saved object types to include in the export. Use `*` to export all the types. Valid options depend on enabled plugins, but may include `visualization`, `dashboard`, `search`, `index-pattern`, `tag`, `config`, `config-global`, `lens`, `map`, `event-annotation-group`, `query`, `url`, `action`, `alert`, `alerting_rule_template`, `apm-indices`, `cases-user-actions`, `cases`, `cases-comments`, `infrastructure-monitoring-log-view`, `ml-trained-model`, `osquery-saved-query`, `osquery-pack`, `osquery-pack-asset`.
    **Repeatable:** pass `--type` multiple times to supply more than one value
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>