b9996e6bbe
Also update the Docs and fixup the HTTP API to return proper errors when someone attempts to use Namespaces with an OSS agent. Add Namespace HTTP API docs Make all API endpoints disallow unknown fields
37 lines
777 B
Plaintext
37 lines
777 B
Plaintext
---
|
|
layout: "docs"
|
|
page_title: "Commands: KV Export"
|
|
sidebar_current: "docs-commands-kv-export"
|
|
---
|
|
|
|
# Consul KV Export
|
|
|
|
Command: `consul kv export`
|
|
|
|
The `kv export` command is used to retrieve KV pairs for the given
|
|
prefix from Consul's KV store, and write a JSON representation to
|
|
stdout. This can be used with the command "consul kv import" to move entire
|
|
trees between Consul clusters.
|
|
|
|
## Usage
|
|
|
|
Usage: `consul kv export [options] [PREFIX]`
|
|
|
|
#### API Options
|
|
|
|
<%= partial "docs/commands/http_api_options_client" %>
|
|
<%= partial "docs/commands/http_api_options_server" %>
|
|
|
|
#### Enterprise Options
|
|
|
|
<%= partial "docs/commands/http_api_namespace_options" %>
|
|
|
|
## Examples
|
|
|
|
To export the tree at "vault/" in the key value store:
|
|
|
|
```
|
|
$ consul kv export vault/
|
|
# JSON output
|
|
```
|