github.com/KyaXTeam/consul@v1.4.5/website/source/docs/commands/kv/export.html.markdown.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: KV Export"
     4  sidebar_current: "docs-commands-kv-export"
     5  ---
     6  
     7  # Consul KV Export
     8  
     9  Command: `consul kv export`
    10  
    11  The `kv export` command is used to retrieve KV pairs for the given
    12  prefix from Consul's KV store, and write a JSON representation to
    13  stdout. This can be used with the command "consul kv import" to move entire
    14  trees between Consul clusters.
    15  
    16  ## Usage
    17  
    18  Usage: `consul kv export [options] [PREFIX]`
    19  
    20  #### API Options
    21  
    22  <%= partial "docs/commands/http_api_options_client" %>
    23  <%= partial "docs/commands/http_api_options_server" %>
    24  
    25  ## Examples
    26  
    27  To export the tree at "vault/" in the key value store:
    28  
    29  ```
    30  $ consul kv export vault/
    31  # JSON output
    32  ```