Enterprise 'influxd-ctl' CLI restructure (#5166)

* WIP influxd-ctl cli restructure

* added influxd-ctl ldap docs, closes influxdata/DAR#389

* WIP influxd-ctl restructure

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
pull/5168/head
Scott Anderson 2023-10-05 14:23:52 -06:00 committed by GitHub
parent d3e26012a3
commit ff845e4e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 2203 additions and 1446 deletions

View File

@ -124,9 +124,9 @@ An edge case regression was introduced into this version that may cause a consta
#### Backup enhancements
- **Revert damaged meta nodes to a previous state**: Add the `-meta-only-overwrite-force` option to [`influxd-ctl restore`](/enterprise_influxdb/v1/tools/influxd-ctl/#restore) to revert damaged meta nodes in an existing cluster to a previous state when restoring an InfluxDB Enterprise database.
- **Revert damaged meta nodes to a previous state**: Add the `-meta-only-overwrite-force` option to [`influxd-ctl restore`](/enterprise_influxdb/v1/tools/influxd-ctl/restore/) to revert damaged meta nodes in an existing cluster to a previous state when restoring an InfluxDB Enterprise database.
- **Estimate the size of a backup** (full or incremental) and provide progress messages. Add `-estimate` option to [`influxd-ctl backup`](/enterprise_influxdb/v1/tools/influxd-ctl/#backup) to estimate the size of a backup (full or incremental) and provide progress messages. Prints the number of files to back up, the percentage of bytes transferred for each file (organized by shard), and the estimated time remaining to complete the backup.
- **Estimate the size of a backup** (full or incremental) and provide progress messages. Add `-estimate` option to [`influxd-ctl backup`](/enterprise_influxdb/v1/tools/influxd-ctl/backup/) to estimate the size of a backup (full or incremental) and provide progress messages. Prints the number of files to back up, the percentage of bytes transferred for each file (organized by shard), and the estimated time remaining to complete the backup.
#### Logging enhancements
@ -157,7 +157,7 @@ An edge case regression was introduced into this version that may cause a consta
#### influxd-ctl updates
- Improve [`influxd-ctl join`](/enterprise_influxdb/v1/tools/influxd-ctl/#join) robustness and provide better error messages on failure.
- Improve [`influxd-ctl join`](/enterprise_influxdb/v1/tools/influxd-ctl/join/) robustness and provide better error messages on failure.
- Add user friendly error message when accessing a TLS-enabled server without TLS enabled on client.
## v1.9.5 [2021-10-11]
@ -170,7 +170,7 @@ Changes below are included in InfluxDB Enterprise 1.9.5.
### Features
#### New restore options
- Add the following options for [restoring](/enterprise_influxdb/v1/tools/influxd-ctl/#restore) InfluxDB Enterprise databases:
- Add the following options for [restoring](/enterprise_influxdb/v1/tools/influxd-ctl/restore/) InfluxDB Enterprise databases:
- Restore data with a new retention policy into an existing database.
- Override the duration of a retention policy while restoring.
- Specify a destination shard when restoring a specific shard.

View File

@ -79,12 +79,12 @@ influxd-ctl [global-options] backup [backup-options] <path-to-backup-directory>
> **Note:** The `influxd-ctl backup` command exits with `0` for success and `1` for failure. If the backup fails, output can be directed to a log file to troubleshoot.
##### Global options
##### Global flags
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#global-options)
for a complete list of the global `influxd-ctl` options.
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)
for a complete list of the global `influxd-ctl` flags.
##### Backup options
##### Backup flags
- `-db <string>`: name of the single database to back up
- `-from <TCP-address>`: the data node TCP address to prefer when backing up
@ -261,15 +261,15 @@ The existing cluster can have data in the `_internal` database (the database Inf
The system automatically drops the `_internal` database when it performs a complete restore.
{{% /note %}}
##### Global options
##### Global flags
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#global-options)
for a complete list of the global `influxd-ctl` options.
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)
for a complete list of the global `influxd-ctl` flags.
##### Restore options
##### Restore flags
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#restore)
for a complete list of `influxd-ctl restore` options.
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/restore/)
for a complete list of `influxd-ctl restore` flags.
- `-db <string>`: the name of the single database to restore
- `-list`: shows the contents of the backup
@ -294,15 +294,15 @@ that the system creates by default.
The system automatically drops the `_internal` database when it performs a
complete restore.
##### Global options
##### Global flags
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#global-options)
for a complete list of the global `influxd-ctl` options.
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)
for a complete list of the global `influxd-ctl` flags.
##### Restore options
##### Restore flags
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/#restore)
for a complete list of `influxd-ctl restore` options.
See the [`influxd-ctl` documentation](/enterprise_influxdb/v1/tools/influxd-ctl/restore/)
for a complete list of `influxd-ctl restore` flags.
- `-db <string>`: the name of the single database to restore
- `-list`: shows the contents of the backup

View File

@ -226,9 +226,9 @@ This only applies to shards in the repair queue.
It does not cancel repairs on nodes that are in the process of being repaired.
Once a repair has started, requests to cancel it are ignored.
> Stopping a entropy repair for a **missing** shard operation is not currently supported.
> Stopping an entropy repair for a **missing** shard operation is not currently supported.
> It may be possible to stop repairs for missing shards with the
> [`influxd-ctl kill-copy-shard`](/enterprise_influxdb/v1/tools/influxd-ctl/#kill-copy-shard) command.
> [`influxd-ctl kill-copy-shard`](/enterprise_influxdb/v1/tools/influxd-ctl/kill-copy-shard/) command.
## InfluxDB Anti-Entropy API
@ -302,8 +302,8 @@ remaining replicas in the cluster.
In rare cases, the currently active shard, or the shard to which new data is
currently being written, may find itself with inconsistent data.
Because the Anti-Entropy process can't write to hot shards, you must stop writes to the new
shard using the [`influxd-ctl truncate-shards` command](/enterprise_influxdb/v1/tools/influxd-ctl/#truncate-shards),
Because the anti-entropy process can't write to hot shards, you must stop writes to the new
shard using the [`influxd-ctl truncate-shards` command](/enterprise_influxdb/v1/tools/influxd-ctl/truncate-shards/),
then add the inconsistent shard to the entropy repair queue:
```bash

View File

@ -14,7 +14,7 @@ aliases:
>**Note:** The Anti-Entropy API is available from the meta nodes and is only available when the Anti-Entropy service is enabled in the data node configuration settings. For information on the configuration settings, see
> [Anti-Entropy settings](/enterprise_influxdb/v1/administration/config-data-nodes/#anti-entropy-ae-settings).
Use the [Anti-Entropy service](/enterprise_influxdb/v1/administration/anti-entropy) in InfluxDB Enterprise to monitor and repair entropy in data nodes and their shards. To access the Anti-Entropy API and work with this service, use [`influxd-ctl entropy`](/enterprise_influxdb/v1/tools/influxd-ctl/#entropy) (also available on meta nodes).
Use the [Anti-Entropy service](/enterprise_influxdb/v1/administration/anti-entropy) in InfluxDB Enterprise to monitor and repair entropy in data nodes and their shards. To access the Anti-Entropy API and work with this service, use [`influxd-ctl entropy`](/enterprise_influxdb/v1/tools/influxd-ctl/entropy/) (also available on meta nodes).
The base URL is:

View File

@ -10,6 +10,8 @@ weight: 30
aliases:
- /enterprise_influxdb/v1/administration/ldap/
- /enterprise_influxdb/v1/administration/manage/security/ldap/
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/ldap/
---
Configure InfluxDB Enterprise to use LDAP (Lightweight Directory Access Protocol) to:
@ -222,6 +224,9 @@ enabled = true
## Troubleshoot LDAP in InfluxDB Enterprise
- [InfluxDB Enterprise does not recognize a new LDAP server](#influxdb-enterprise-does-not-recognize-a-new-ldap-server)
- [User cannot log in after updating their password in the LDAP server](#user-cannot-log-in-after-updating-their-password-in-the-ldap-server)
### InfluxDB Enterprise does not recognize a new LDAP server
If you ever replace an LDAP server with a new one, you need to update your
@ -297,3 +302,23 @@ sudo systemctl restart influxdb-meta
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
### User cannot log in after updating their password in the LDAP server
LDAP credentials are cached on InfluxDB Enterprise data nodes. If credentials
change in the LDAP server, the cached credentials need to be purged and the
cache refreshed to add the updated credentials.
1. Use the [`influxd-ctl ldap purge-cache` command](/enterprise_influxdb/v1/tools/influxd-ctl/ldap/purge-cache/)
to purge LDAP credential caches on data nodes.
```sh
influxd-ctl ldap purge-cache
```
2. Use the [`influxd-ctl ldap warm-cache` command](/enterprise_influxdb/v1/tools/influxd-ctl/ldap/warm-cache/)
to warm LDAP credential caches on data nodes.
```sh
influxd-ctl ldap warm-cache
```

View File

@ -14,14 +14,17 @@ To add a data node to an existing cluster, follow the steps below.
1. Install and start a new data node.
Complete steps 13 of the [data node installation instructions](/enterprise_influxdb/v1/introduction/installation/data_node_installation/#step-1-add-appropriate-dns-entries-for-each-of-your-servers).
2. To join the new node to the cluster, do one of the following:
- From a meta node, run:
```sh
influxd-ctl add-data <new data node address>:<port>
```
- From a remote server, run:
```sh
influxd-ctl -bind <existing_meta_node:8091> add-data <new data node
address>:<port>
```
- From a meta node, run:
```sh
influxd-ctl add-data <new_data_node_host>:<port>
```
- From a remote server, run:
```sh
influxd-ctl -bind <existing_meta_node:8091> add-data <new_data_node_host>:<port>
```
3. (Optional) [Rebalance the cluster](/enterprise_influxdb/v1/administration/manage/clusters/rebalance/).

View File

@ -78,7 +78,7 @@ Often in this scenario, rather than replacing the entire host, you just need to
Host information remains the same, but once started again, the `influxd` process doesn't know
to communicate with the meta nodes so the AE process can't start the shard-sync process.
To resolve this, log in to a meta node and use the [`influxd-ctl update-data`](/enterprise_influxdb/v1/tools/influxd-ctl/#update-data) command
To resolve this, sign in to a meta node and use the [`influxd-ctl update-data`](/enterprise_influxdb/v1/tools/influxd-ctl/update-data/) command
to [update the failed data node to itself](#2-replace-the-old-data-node-with-the-new-data-node).
```bash

View File

@ -0,0 +1,234 @@
---
title: Manage node labels
description: >
Assign user-defined labels to nodes in your InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
name: Manage node labels
parent: Manage
weight: 101
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/show/
- /enterprise_influxdb/v1/tools/influxd-ctl/node-labels/
---
Assign user-defined labels to nodes in your InfluxDB Enterprise cluster.
**Node labels** are user-defined key-value pairs assigned to nodes in your
cluster that act as metadata for each node.
The tools used for viewing and managing node labels in your InfluxDB Enterprise cluster
are the [`influxd-ctl show` command ](/enterprise_influxdb/v1/tools/influxd-ctl/show/)
and the [`influxd-ctl node-label` command and subcommands](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/).
<!-- TOC -->
- [View node labels](#view-node-labels)
- [Add labels to a node](#add-labels-to-a-node)
- [Update node labels](#update-node-labels)
- [Delete node labels](#delete-node-labels)
- [Programmatically access node labels](#programmatically-access-node-labels)
<!-- TOC -->
## View node labels
Use the [`influxd-ctl show` command](/enterprise_influxdb/v1/tools/influxd-ctl/show/)
to view information about nodes in your InfluxDB Enterprise cluster, including
node labels.
```sh
influxd-ctl show
```
{{< expand-wrapper >}}
{{% expand "View example `influxd-ctl show` output" %}}
```sh
Data Nodes
==========
ID TCP Address Version Labels
4 data-node-01:8188 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-west"}
5 data-node-02:8288 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-east"}
Meta Nodes
==========
ID TCP Address Version Labels
1 meta-node-01:8191 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-west"}
2 meta-node-02:8291 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-east"}
3 meta-node-03:8391 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-west"}
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Add labels to a node
To add a label to a node in your InfluxDB Enterprise cluster, use the
[`influxd-ctl node-labels set` command](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/set/)
and include the following flags:
- **-nodeid**: Node ID to add the labels to
- **-labels**: JSON object of label key-value pairs
```sh
influxd-ctl node-labels set -nodeid 4 -labels '{"az":"us-east","team":"amer"}'
```
{{< expand-wrapper >}}
{{% expand "View `influxd-ctl show` output with added labels" %}}
```sh
Data Nodes
==========
ID TCP Address Version Labels
4 data-node-01:8188 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-east","team":"amer"}
5 data-node-02:8288 {{< latest-patch >}}-c{{< latest-patch >}} {}
Meta Nodes
==========
ID TCP Address Version Labels
1 meta-node-01:8191 {{< latest-patch >}}-c{{< latest-patch >}} {}
2 meta-node-02:8291 {{< latest-patch >}}-c{{< latest-patch >}} {}
3 meta-node-03:8391 {{< latest-patch >}}-c{{< latest-patch >}} {}
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Update node labels
To update node labels, use the
[`influxd-ctl node-labels set` command](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/set/)
and include the following flags:
- **-nodeid**: Node ID to update the labels on
- **-labels**: JSON object of label key-value pairs to update
```sh
influxd-ctl node-labels set -nodeid 4 -labels '{"team":"emea"}'
```
_Only label keys included in the `-labels` JSON object are updated.
All other node labels are not modified._
{{< expand-wrapper >}}
{{% expand "View `influxd-ctl show` output with updated labels" %}}
```sh
Data Nodes
==========
ID TCP Address Version Labels
4 data-node-01:8188 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-east","team":"emea"}
5 data-node-02:8288 {{< latest-patch >}}-c{{< latest-patch >}} {}
Meta Nodes
==========
ID TCP Address Version Labels
1 meta-node-01:8191 {{< latest-patch >}}-c{{< latest-patch >}} {}
2 meta-node-02:8291 {{< latest-patch >}}-c{{< latest-patch >}} {}
3 meta-node-03:8391 {{< latest-patch >}}-c{{< latest-patch >}} {}
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Delete node labels
To update node labels, use the
[`influxd-ctl node-labels set` command](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/set/)
and include the following flags:
- **-nodeid**: Node ID to update the labels on
- **-labels**: JSON object of label key-value pairs to update
```sh
influxd-ctl node-labels delete -nodeid 4 -labels '["team"]'
```
{{< expand-wrapper >}}
{{% expand "View `influxd-ctl show` output with deleted label" %}}
```sh
Data Nodes
==========
ID TCP Address Version Labels
4 data-node-01:8188 {{< latest-patch >}}-c{{< latest-patch >}} {"az":"us-east"}
5 data-node-02:8288 {{< latest-patch >}}-c{{< latest-patch >}} {}
Meta Nodes
==========
ID TCP Address Version Labels
1 meta-node-01:8191 {{< latest-patch >}}-c{{< latest-patch >}} {}
2 meta-node-02:8291 {{< latest-patch >}}-c{{< latest-patch >}} {}
3 meta-node-03:8391 {{< latest-patch >}}-c{{< latest-patch >}} {}
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Programmatically access node labels
Use the `/show-cluster` endpoint of meta node API to return a JSON object containing
information about your InfluxDB Enterprise cluster, including node labels.
{{< api-endpoint method="get" endpoint="meta-node-host:8191/show-cluster" >}}
{{< expand-wrapper >}}
{{% expand "View example JSON output" %}}
```json
{
"data": [
{
"id": 4,
"addr": "data-node-01:8086",
"httpScheme": "http",
"tcpAddr": "data-node-01:8088",
"version": "v1.10.0",
"labels": {
"az": "us-east",
"team": "emea"
}
},
{
"id": 5,
"addr": "data-node-02:8086",
"httpScheme": "http",
"tcpAddr": "data-node-02:8088",
"version": "v1.10.0",
"labels": {
"az": "us-west",
"team": "apac"
}
}
],
"meta": [
{
"id": 1,
"addr": "meta-node-01:8091",
"httpScheme": "http",
"tcpAddr": "meta-node-01:8089",
"version": "v1.10.0",
"labels": {
"az": "us-east",
"team": "emea"
}
},
{
"id": 2,
"addr": "meta-node-02:8091",
"httpScheme": "http",
"tcpAddr": "meta-node-02:8089",
"version": "v1.10.0",
"labels": {
"az": "us-west",
"team": "apac"
}
},
{
"id": 3,
"addr": "meta-node-03:8091",
"httpScheme": "http",
"tcpAddr": "meta-node-03:8089",
"version": "v1.10.0",
"labels": {
"az": "us-east",
"team": "amer"
}
}
]
}
```
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -107,11 +107,11 @@ Meta nodes expose the `/debug/pprof` endpoints for profiling and troubleshooting
## Shard movement
* [Copy shard](/enterprise_influxdb/v1/tools/influxd-ctl/#copy-shard) support - copy a shard from one node to another
* [Copy shard status](/enterprise_influxdb/v1/tools/influxd-ctl/#copy-shard-status) - query the status of a copy shard request
* [Kill copy shard](/enterprise_influxdb/v1/tools/influxd-ctl/#kill-copy-shard) - kill a running shard copy
* [Remove shard](/enterprise_influxdb/v1/tools/influxd-ctl/#remove-shard) - remove a shard from a node (this deletes data)
* [Truncate shards](/enterprise_influxdb/v1/tools/influxd-ctl/#truncate-shards) - truncate all active shard groups and start new shards immediately (This is useful when adding nodes or changing replication factors.)
* [Copy shard](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard/) support - copy a shard from one node to another
* [Copy shard status](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard-status/) - query the status of a copy shard request
* [Kill copy shard](/enterprise_influxdb/v1/tools/influxd-ctl/kill-copy-shard/) - kill a running shard copy
* [Remove shard](/enterprise_influxdb/v1/tools/influxd-ctl/remove-shard/) - remove a shard from a node (this deletes data)
* [Truncate shards](/enterprise_influxdb/v1/tools/influxd-ctl/truncate-shards/) - truncate all active shard groups and start new shards immediately (This is useful when adding nodes or changing replication factors.)
This functionality is exposed via an API on the meta service and through [`influxd-ctl` sub-commands](/enterprise_influxdb/v1/tools/influxd-ctl/).
@ -145,7 +145,7 @@ Best practices when using an active-passive node setup:
- Keep the ratio of active to passive nodes between 1:1 and 2:1.
- Passive nodes should receive all writes.
For more inforrmation, see how to [add a passive node to a cluster](/enterprise_influxdb/v1/tools/influxd-ctl/#add-a-passive-node-to-the-cluster).
For more inforrmation, see how to [add a passive node to a cluster](/enterprise_influxdb/v1/tools/influxd-ctl/add-data/#add-a-passive-data-node-to-a-cluster).
{{% note %}}
**Note:** This feature is experimental and available only in InfluxDB Enterprise.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,107 @@
---
title: influxd-ctl CLI
description: >
Use the `influxd-ctl` CLI to manage your InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
weight: 11
parent: Tools
name: influxd-ctl
aliases:
- /enterprise_influxdb/v1/tools/influxd/restore/
- /enterprise_influxdb/v1/tools/influxd/backup/
---
The `influxd-ctl` CLI provides commands for managing your InfluxDB Enterprise cluster.
The `influxd-ctl` utility is available on all InfluxDB Enterprise
[meta nodes](/enterprise_influxdb/v1/concepts/glossary/#meta-node).
## Usage
```
influxd-ctl [global-flags] <command> [command-flags] [arguments]
```
## Commands
| Command | Description |
| :-------------------------------------------------------------------------------- | :------------------------------- |
| [add-data](/enterprise_influxdb/v1/tools/influxd-ctl/add-data/) | Add a data node |
| [add-meta](/enterprise_influxdb/v1/tools/influxd-ctl/add-meta/) | Add a meta node |
| [backup](/enterprise_influxdb/v1/tools/influxd-ctl/backup/) | Back up a cluster |
| [copy-shard](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard/) | Copy a shard between data nodes |
| [copy-shard-status](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard-status/) | Show all active copy shard tasks |
| [entropy](/enterprise_influxdb/v1/tools/influxd-ctl/entropy/) | Manage entropy in a cluster |
| [join](/enterprise_influxdb/v1/tools/influxd-ctl/join/) | Join a meta or data node |
| [kill-copy-shard](/enterprise_influxdb/v1/tools/influxd-ctl/kill-copy-shard/) | Abort an in-progress shard copy |
| [ldap](/enterprise_influxdb/v1/tools/influxd-ctl/ldap/) | Manage LDAP in a cluster |
| [leave](/enterprise_influxdb/v1/tools/influxd-ctl/leave/) | Remove a meta or data node |
| [remove-data](/enterprise_influxdb/v1/tools/influxd-ctl/remove-data/) | Remove a data node |
| [remove-meta](/enterprise_influxdb/v1/tools/influxd-ctl/remove-meta/) | Remove a meta node |
| [remove-shard](/enterprise_influxdb/v1/tools/influxd-ctl/remove-shard/) | Remove a shard from a data node |
| [restore](/enterprise_influxdb/v1/tools/influxd-ctl/restore/) | Restore a backup of a cluster |
| [show](/enterprise_influxdb/v1/tools/influxd-ctl/show/) | Show cluster members |
| [show-shards](/enterprise_influxdb/v1/tools/influxd-ctl/show-shards/) | Shows shards in a cluster |
| [node-labels](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/) | Manage node labels |
| [token](/enterprise_influxdb/v1/tools/influxd-ctl/token/) | Generates a signed JWT token |
| [truncate-shards](/enterprise_influxdb/v1/tools/influxd-ctl/truncate-shards/) | Truncate current shards |
| [update-data](/enterprise_influxdb/v1/tools/influxd-ctl/update-data/) | Update a data node |
## Global flags {#influxd-ctl-global-flags}
| Flag | Description |
| :----------- | :----------------------------------------------------------------------- |
| `-auth-type` | Authentication type to use (`none` _default_, `basic`, `jwt`) |
| `-bind` | Meta node HTTP bind address _(default is `localhost:8091`)_ |
| `-bind-tls` | Use TLS |
| `-config` | Configuration file path |
| `-k` | Skip certificate verification _(ignored without `-bind-tls`)_ |
| `-pwd` | Password for basic authentication _(ignored without `-auth-type basic`)_ |
| `-secret` | JWT shared secret _(ignored without `-auth-type jwt`)_ |
| `-user` | Username _(ignored without `-auth-type basic` or `jwt`)_ |
## Examples
- [Bind to a remote meta node](#bind-to-a-remote-meta-node)
- [Authenticate with JWT](#authenticate-with-jwt)
- [Authenticate with basic authentication](#authenticate-with-basic-authentication)
### Bind to a remote meta node
```sh
influxd-ctl -bind meta-node-02:8091
```
### Authenticate with JWT
```sh
influxd-ctl -auth-type jwt -secret oatclusters
```
### Authenticate with basic authentication
```sh
influxd-ctl -auth-type basic -user admin -pwd passw0rd
```
{{< expand-wrapper >}}
{{% expand "Troubleshoot `influxd-ctl` authentication" %}}
If authentication is enabled in the cluster's
[meta node configuration files](/enterprise_influxdb/v1/administration/config-meta-nodes/#auth-enabled-false)
and [data node configuration files](/enterprise_influxdb/v1/administration/configure/config-data-nodes/#meta-auth-enabled)
and the `influxd-ctl` command does not include authentication details, the system returns:
```bash
Error: unable to parse authentication credentials.
```
If authentication is enabled and the `influxd-ctl` command provides the incorrect
username or password, the system returns:
```bash
Error: authorization failed.
```
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -0,0 +1,63 @@
---
title: influxd-ctl add-data
description: >
The `influxd-ctl add-data` command adds a data node to an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/introduction/installation/data_node_installation/
---
The `influxd-ctl add-data` command adds a data node to an InfluxDB Enterprise cluster.
By default, `influxd-ctl` adds the specified data node to the local meta node's cluster.
Use `add-data` instead of the [`join` argument](#join) when
[installing a data node](/enterprise_influxdb/v1/introduction/installation/data_node_installation/)
an InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl add-data [flags] <tcp-bind-address>
```
## Arguments
- **tcp-bind-address**: TCP bind address of the data node to add to the cluster
(`host:port`)
## Flags
| Flag | Description |
| :--- | :---------------------------------------------------------------------------------------------------------- |
| `-p` | Add the data node as a [passive node](/enterprise_influxdb/v1/concepts/glossary/#passive-node-experimental) |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Add a data node to a cluster](#add-a-data-node-to-a-cluster)
- [Add a data node to a cluster using a remote meta node](#add-a-data-node-to-a-cluster-using-a-remote-meta-node)
- [Add a passive data node to a cluster](#add-a-passive-data-node-to-a-cluster)
### Add a data node to a cluster
```bash
influxd-ctl add-data cluster-data-node-04:8088
```
### Add a data node to a cluster using a remote meta node
```bash
influxd-ctl -bind cluster-meta-node-01:8091 add-data cluster-data-node-04:8088
```
### Add a passive data node to a cluster
```bash
influxd-ctl add-data -p cluster-data-node-04:8088
```

View File

@ -0,0 +1,50 @@
---
title: influxd-ctl add-meta
description: >
The `influxd-ctl add-meta` command adds a meta node to an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/introduction/installation/data_node_installation/
---
The `influxd-ctl add-meta` command adds a meta node to an InfluxDB Enterprise cluster.
By default, `influxd-ctl` adds the specified meta node to the local meta node's cluster.
Use `add-meta` instead of the [`join` argument](#join) when
[installing a meta node](/enterprise_influxdb/v1/introduction/installation/meta_node_installation/)
an InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl [flags] add-meta <http-bind-address>
```
## Arguments
- **http-bind-address**: HTTP bind address of the meta node to add to the cluster
(`host:port`)
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
- [Add a meta node to a cluster](#add-a-meta-node-to-a-cluster)
- [Add a meta node to a cluster using a remote meta node](#add-a-meta-node-to-a-cluster-using-a-remote-meta-node)
### Add a meta node to a cluster
```bash
influxd-ctl add-meta cluster-meta-node-03:8091
```
### Add a meta node to a cluster using a remote meta node
```bash
influxd-ctl -bind cluster-meta-node-01:8091 add-meta cluster-meta-node-03:8091
```

View File

@ -0,0 +1,106 @@
---
title: influxd-ctl backup
description: >
The `influxd-ctl backup` command backs up an InfluxDB Enterprise cluster's
[metastore](/enterprise_influxdb/v1/concepts/glossary/#metastore) and
[shard](/enterprise_influxdb/v1/concepts/glossary/#shard) data at that point in
time and stores the copy in the specified directory.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/backup-and-restore/
- /enterprise_influxdb/v1/tools/influxd-ctl/backup/
---
The `influxd-ctl backup` command backs up an InfluxDB Enterprise cluster's
[metastore](/enterprise_influxdb/v1/concepts/glossary/#metastore) and
[shard](/enterprise_influxdb/v1/concepts/glossary/#shard) data at that point in
time and stores the copy in the specified directory.
To back up only the cluster metastore, use the `-strategy only-meta` flag.
Backups are incremental by default, meaning they create a copy of the metastore
and shard data that have changed since the previous incremental backup.
If there are no existing incremental backups, the system automatically performs
a complete backup.
#### Backup strategies
InfluxDB Enterprise supports the following backup strategies:
- **only-meta**: Back up metastore data only, including users, roles, databases,
continuous queries, and retention policies. This strategy does not back up shards.
- **full**: Back up metastore and all shard data.
- **incremental**: _(Default)_ Back up metastore and shard data that has changed
since the last incremental backup. If there are no existing incremental backups,
the system automatically performs a full backup.
## Usage
```sh
influxd-ctl backup [flags] <backup-dir>
```
## Arguments
- **backup-dir**: Directory to store backup files in
## Flags
| Flag | Description |
| :---------- | :------------------------------------------------------------------ |
| `-db` | Database to backup |
| `-end` | End date for backup _(RFC3339 timestamp)_ |
| `-estimate` | Estimate the size of the requested backup |
| `-from` | Data node TCP address to prefer when backing up |
| `-full` | Perform an full backup _(deprecated in favour of `-strategy full`)_ |
| `-rp` | Retention policy to backup |
| `-shard` | Shard ID to backup |
| `-start` | Start date for backup _(RFC3339 timestamp)_ |
| `-strategy` | Backup strategy to use (`only-meta`, `full`, or `incremental`) |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Perform an incremental backup](#perform-an-incremental-backup)
- [Perform a full backup](#perform-a-full-backup)
- [Estimate the size of a backup](#estimate-the-size-of-a-backup)
- [Backup data from a specific time range](#backup-data-from-a-specific-time-range)
- [Backup a specific shard](#backup-a-specific-shard)
### Perform an incremental backup
```sh
influxd-ctl backup /path/to/backup-dir
```
### Perform a full backup
```sh
influxd-ctl backup -full /path/to/backup-dir
```
### Estimate the size of a backup
```sh
influxd-ctl backup -estimate
```
### Backup data from a specific time range
```sh
influxd-ctl backup \
-start 2023-01-01T00:00:00Z \
-end 2023-06-01T00:00:00Z \
/path/to/backup-dir
```
### Backup a specific shard
```sh
influxd-ctl backup -shard 00 /path/to/backup-dir
```

View File

@ -0,0 +1,47 @@
---
title: influxd-ctl copy-shard-status
description: >
The `influxd-ctl copy-shard-status` command returns information about all in-progress
copy shard operations.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/clusters/rebalance/
- /enterprise_influxdb/v1/tools/influxd-ctl/copy-shard/
- /enterprise_influxdb/v1/tools/influxd-ctl/kill-copy-shard/
---
The `influxd-ctl copy-shard-status` command returns information about all in-progress
[copy shard](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard/) operations.
## Usage
```sh
influxd-ctl copy-shard-status
```
Output includes the following:
- Source node
- Destination node
- Database
- Retention policy
- Shard ID
- Total size
- Current size
- Operation start time
{{< expand-wrapper >}}
{{% expand "View example ouput" %}}
```sh
Source Dest Database Policy ShardID TotalSize CurrentSize StartedAt
cluster-data-node-02:8088 cluster-data-node-03:8088 telegraf autogen 34 119624324 119624324 2023-06-22 23:45:09.470696179 +0000 UTC
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,39 @@
---
title: influxd-ctl copy-shard
description: >
The `influxd-ctl copy-shard` command copies a shard from one data node to another.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/clusters/rebalance/
- /enterprise_influxdb/v1/tools/influxd-ctl/show-shards/
- /enterprise_influxdb/v1/tools/influxd-ctl/copy-shard-status/
- /enterprise_influxdb/v1/tools/influxd-ctl/kill-copy-shard/
---
The `influxd-ctl copy-shard` command copies a shard from one data node to another.
## Usage
```sh
influxd-ctl copy-shard <source-tcp-address> <destination-tcp-address> <shard-id>
```
## Arguments
- **source-tcp-address**: TCP address of the source data node (`host:port`)
- **destination-tcp-address**: TCP address of the destination data node (`host:port`)
- **shard-id**: Shard ID to copy
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```bash
influxd-ctl copy-shard cluster-data-node-01:8088 cluster-data-node-02:8088 22
```

View File

@ -0,0 +1,33 @@
---
title: influxd-ctl entropy
description: >
The `influxd-ctl entropy` command repairs and manages entropy in an InfluxDB
Enterprise Cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/configure/anti-entropy/
---
The `influxd-ctl entropy` command repairs and manages entropy in an InfluxDB
Enterprise Cluster.
## Usage
```sh
influxd-ctl entropy [subcommand] [flags] [arguments]
```
## Commands
| Command | Description |
| :---------------------------------------------------------------------------- | :------------------------------------------- |
| [kill-repair](/enterprise_influxdb/v1/tools/influxd-ctl/entropy/kill-repair/) | Remove a shard from the entropy repair queue |
| [repair](/enterprise_influxdb/v1/tools/influxd-ctl/entropy/repair/) | Repair entropy found in a shard |
| [show](/enterprise_influxdb/v1/tools/influxd-ctl/entropy/show/) | Show shard entropy |
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,42 @@
---
title: influxd-ctl entropy kill-repair
description: >
The `influxd-ctl entropy kill-repair` command removes a shard from the entropy
repair queue.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl entropy
weight: 301
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/entropy/show/
- /enterprise_influxdb/v1/administration/configure/anti-entropy/
---
The `influxd-ctl entropy kill-repair` command removes a shard from the entropy
repair queue.
{{% note %}}
This only applies to shards in the repair queue.
It does not cancel repairs on shards that are in the process of being repaired.
Once a repair has started, it can't be canceled.
{{% /note %}}
## Usage
```sh
influxd-ctl entropy kill-repair <shard-id>
```
## Arguments
- **shard-id**: Shard ID to remove from the entropy repair queue
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```sh
influxd-ctl entropy kill-repair 21179
```

View File

@ -0,0 +1,34 @@
---
title: influxd-ctl entropy repair
description: >
The `influxd-ctl entropy repair` command adds a shard to the entropy repair queue.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl entropy
weight: 301
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/entropy/show/
- /enterprise_influxdb/v1/administration/configure/anti-entropy/
---
The `influxd-ctl entropy repair` command adds a shard to the entropy repair queue.
## Usage
```sh
influxd-ctl entropy repair <shard-id>
```
## Arguments
- **shard-id**: Shard ID to add to the entropy repair queue
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```sh
influxd-ctl entropy repair 21179
```

View File

@ -0,0 +1,46 @@
---
title: influxd-ctl entropy show
description: >
The `influxd-ctl entropy show` command returns all shards with detected entropy.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl entropy
weight: 301
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/entropy/repair/
- /enterprise_influxdb/v1/administration/configure/anti-entropy/
---
The `influxd-ctl entropy show` command returns all shards with detected entropy.
## Usage
```sh
influxd-ctl entropy show
```
Output includes the following:
- Shard ID
- Database
- Retention policy
- Shard start time
- Shard end time
- Shard expiration time
- Shard entropy status
{{< expand-wrapper >}}
{{% expand "View example output" %}}
```sh
Entropy
==========
ID Database Retention Policy Start End Expires Status
21179 statsdb 1hour 2023-10-09 00:00:00 +0000 UTC 2023-10-16 00:00:00 +0000 UTC 2024-10-22 00:00:00 +0000 UTC diff
25165 statsdb 1hour 2023-11-20 00:00:00 +0000 UTC 2023-11-27 00:00:00 +0000 UTC 2024-12-03 00:00:00 +0000 UTC diff
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,138 @@
---
title: influxd-ctl join
description: >
The `influxd-ctl join` command joins a meta or data node data node to an
InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/leave/
---
The `influxd-ctl join` command joins a meta or data node data node to an
InfluxDB Enterprise cluster.
The command searches for `influxd` and `influxd-meta` processes running on the
local machine bound to specific ports and determines if that process is an
InfluxDB meta or data node.
- **8088**: Data node
- **8091**: Meta node
{{% note %}}
If the InfluxDB data or meta processes are running on non-default ports, the
join operation cannot detect them.
{{% /note %}}
## Usage
```sh
influxd-ctl join [flags] <meta-node-http-bind-address>
```
## Arguments
- **meta-node-http-bind-address**: HTTP bind address of a meta node in an
_existing_ cluster. Use this argument to add un-joined meta or data node to an
existing cluster.
## Flags
| Flag | Description |
| :--- | :---------------------------------------------------------------------------------------------------------- |
| `-p` | Add the data node as a [passive node](/enterprise_influxdb/v1/concepts/glossary/#passive-node-experimental) |
| `-v` | Print verbose information when joining |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Join a meta and data node into a cluster](#join-a-meta-and-data-node-into-a-cluster)
- [Join a meta and data node to an existing cluster](#join-a-meta-and-data-node-to-an-existing-cluster)
- [Join a meta node to an existing cluster](#join-a-meta-node-to-an-existing-cluster)
### Join a meta and data node into a cluster
In the following example, `influxd-ctl join` command detects a meta node process
running at `cluster-node-03:8091` and a data node process running at
`cluster-node-03:8088` and joins them into a _new_ cluster.
```sh
influxd-ctl join
```
###### Command output
```txt
Joining meta node at localhost:8091
Searching for meta node on cluster-node-03:8091...
Searching for data node on cluster-node-03:8088...
Successfully created cluster
* Added meta node 1 at cluster-node-03:8091
* Added data node 2 at cluster-node-03:8088
To join additional nodes to this cluster, run the following command:
influxd-ctl join cluster-node-03:8091
```
### Join a meta and data node to an existing cluster
In the following example, `influxd-ctl join` detects a meta node process running
at `cluster-node-03:8091` and a data node process running at `cluster-node-03:8088`.
It uses the meta node running at `cluster-meta-node-02:8091` in an _existing_
cluster to join the newly detected meta and data nodes to the cluster.
```sh
influxd-ctl join cluster-meta-node-02:8091
```
###### Command output
```txt
Joining meta node at cluster-meta-node-02:8091
Searching for meta node on cluster-node-03:8091...
Searching for data node on cluster-node-03:8088...
Successfully joined cluster
* Added meta node 3 at cluster-node-03:8091
* Added data node 4 at cluster-node-03:8088
```
### Join a meta node to an existing cluster
In the following example, `influxd-ctl join` detects a meta node process running
at `cluster-meta-node-03:8091`, but does not detect a data node process.
It uses the meta node running at `cluster-meta-node-02:8091` in an _existing_
cluster to join the newly detected meta node to the cluster.
```bash
influxd-ctl join cluster-meta-node-02:8091
```
###### Command output
```txt
Joining meta node at cluster-meta-node-02:8091
Searching for meta node on cluster-meta-node-03:8091...
Searching for data node on cluster-meta-node-03:8088...
Successfully joined cluster
* Added meta node 18 at cluster-meta-node-03:8091
* No data node added. Run with -v to see more information
```
## Troubleshoot influxd-ctl join
Common problems when attempting to join nodes to InfluxDB Enterprise clusters:
- The `influxd` or `influxd-meta` processes are using non-standard ports and can't be detected.
- The `influxd` or `influxd-meta` processes are not running.
Check the logs for startup errors.

View File

@ -0,0 +1,37 @@
---
title: influxd-ctl kill-copy-shard
description: >
The `influxd-ctl kill-copy-shard` command aborts an in-progress copy-shard operation.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/copy-shard-status/
- /enterprise_influxdb/v1/tools/influxd-ctl/copy-shard/
---
The `influxd-ctl kill-copy-shard` command aborts an in-progress
[copy-shard operation](/enterprise_influxdb/v1/tools/influxd-ctl/copy-shard.).
## Usage
```sh
influxd-ctl kill-copy-shard <src-tcp-address> <dest-tcp-addr> <shard-id>
```
## Arguments
- **src-tcp-address**: TCP bind address of the source data node (`host:port`)
- **dest-tcp-addr**: TCP bind address of the destination data node (`host:port`)
- **shard-id**: Shard ID
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```sh
influxd-ctl kill-copy-shard data-node-02:8088 data-node-03:8088 39
```

View File

@ -0,0 +1,41 @@
---
title: influxd-ctl ldap
description: >
The `influxd-ctl ldap` command and subcommands manage LDAP implementations in
an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
cascade:
related:
- /enterprise_influxdb/v1/administration/configure/security/ldap/
---
The `influxd-ctl ldap` command and subcommands manage LDAP implementations in
an InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl ldap [flags] [arguments]
```
## Subcommands
| Subcommand | Description |
| :------------------------------------------------------------------------------------- | :------------------------------------------------------------------------- |
| [get-config](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/get-config/) | Get the LDAP configuration for the entire cluster |
| [set-config](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/set-config/) | Set the LDAP configuration for the entire cluster |
| [sample-config](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/sample-config/) | Print out a sample LDAP configuration |
| [verify](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/verify/) | Attempt to authenticate using LDAP |
| [purge-cache](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/purge-cache/) | Clear the LDAP cache on all data nodes |
| [warm-cache](/enterprise_influxdb/v1/reference/cli/influxd-ctl/ldap/warm-cache/) | Download group membership from LDAP server and preload cache on data nodes |
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,22 @@
---
title: influxd-ctl ldap get-config
description: >
The `influxd-ctl ldap get-config` command prints the LDAP configuration of the
InfluxDB Enterprise cluster to stdout.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap get-config` command prints the LDAP configuration of the
InfluxDB Enterprise cluster to stdout.
## Usage
```sh
influxd-ctl ldap get-config
```
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,22 @@
---
title: influxd-ctl ldap purge-cache
description: >
The `influxd-ctl ldap purge-cache` command instructs all data nodes in an
InfluxDB Enterprise cluster to clear their cached LDAP users and roles.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap purge-cache` command instructs all data nodes in an
InfluxDB Enterprise cluster to clear their cached LDAP users and roles.
## Usage
```sh
influxd-ctl ldap purge-cache
```
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,146 @@
---
title: influxd-ctl ldap sample-config
description: >
The `influxd-ctl ldap sample-config` command prints a sample InfluxDB Enterprise
LDAP configuration to stdout.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap sample-config` command prints a sample InfluxDB Enterprise
LDAP configuration to stdout.
## Usage
```sh
influxd-ctl ldap sample-config
```
{{< expand-wrapper >}}
{{% expand "View sample LDAP configuration" %}}
```toml
# Sample TOML for ldap config.
# First, save this file and edit it for your LDAP server.
# Then test the config with: influxd-ctl ldap verify -ldap-config /path/to/ldap.toml
# Finally, upload the config to the cluster with: influxd-ctl ldap set-config /path/to/ldap.toml
#
# Note: the meta nodes must be configured with meta.ldap-allowed = true
# and the data nodes must be configured with http.auth-enabled = true
enabled = true
[[servers]]
host = "ldap.example.com"
port = 389
# Credentials to use when searching for a user or group.
bind-dn = "cn=read-only-admin,dc=example,dc=com"
bind-password = "read-only-admin password"
# Base DNs to use when applying the search-filter to discover an LDAP user.
search-base-dns = [
"dc=example,dc=com",
]
# LDAP filter to discover a user's DN.
# %s will be replaced with the provided username.
search-filter = "(uid=%s)"
# On Active Directory you might use "(sAMAccountName=%s)".
# Base DNs to use when searching for groups.
group-search-base-dns = ["ou=groups,dc=example,dc=com"]
# LDAP filter to identify groups that a user belongs to.
# %s will be replaced with the user's DN.
group-membership-search-filter = "(&(objectClass=groupOfUniqueNames)(uniqueMember=%s))"
# On Active Directory you might use "(&(objectClass=group)(member=%s))".
# Attribute to use to determine the "group" in the group-mappings section.
group-attribute = "ou"
# On Active Directory you might use "cn".
# LDAP filter to search for groups during cache warming.
# %s will be replaced with the "group" value in the group-mappings section.
group-search-filter = "(&(objectClass=groupOfUniqueNames)(ou=%s))"
# Attribute on group objects indicating membership.
# Used during cache warming, should be same as part of the group-membership-search-filter.
group-member-attribute = "uniqueMember"
# Groups whose members have admin privileges on the influxdb servers.
admin-groups = ["influx-admins"]
# Mappings of LDAP groups to Influx roles.
# All Influx roles need to be manually created to take effect.
[[servers.group-mappings]]
group = "app-developers"
role = "app-metrics-rw"
[[servers.group-mappings]]
group = "web-support"
role = "web-traffic-ro"
meta1:/# influxd-ctl ldap sample-config -h
# Sample TOML for ldap config.
# First, save this file and edit it for your LDAP server.
# Then test the config with: influxd-ctl ldap verify -ldap-config /path/to/ldap.toml
# Finally, upload the config to the cluster with: influxd-ctl ldap set-config /path/to/ldap.toml
#
# Note: the meta nodes must be configured with meta.ldap-allowed = true
# and the data nodes must be configured with http.auth-enabled = true
enabled = true
[[servers]]
host = "ldap.example.com"
port = 389
# Credentials to use when searching for a user or group.
bind-dn = "cn=read-only-admin,dc=example,dc=com"
bind-password = "read-only-admin password"
# Base DNs to use when applying the search-filter to discover an LDAP user.
search-base-dns = [
"dc=example,dc=com",
]
# LDAP filter to discover a user's DN.
# %s will be replaced with the provided username.
search-filter = "(uid=%s)"
# On Active Directory you might use "(sAMAccountName=%s)".
# Base DNs to use when searching for groups.
group-search-base-dns = ["ou=groups,dc=example,dc=com"]
# LDAP filter to identify groups that a user belongs to.
# %s will be replaced with the user's DN.
group-membership-search-filter = "(&(objectClass=groupOfUniqueNames)(uniqueMember=%s))"
# On Active Directory you might use "(&(objectClass=group)(member=%s))".
# Attribute to use to determine the "group" in the group-mappings section.
group-attribute = "ou"
# On Active Directory you might use "cn".
# LDAP filter to search for groups during cache warming.
# %s will be replaced with the "group" value in the group-mappings section.
group-search-filter = "(&(objectClass=groupOfUniqueNames)(ou=%s))"
# Attribute on group objects indicating membership.
# Used during cache warming, should be same as part of the group-membership-search-filter.
group-member-attribute = "uniqueMember"
# Groups whose members have admin privileges on the influxdb servers.
admin-groups = ["influx-admins"]
# Mappings of LDAP groups to Influx roles.
# All Influx roles need to be manually created to take effect.
[[servers.group-mappings]]
group = "app-developers"
role = "app-metrics-rw"
[[servers.group-mappings]]
group = "web-support"
role = "web-traffic-ro"
```
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -0,0 +1,44 @@
---
title: influxd-ctl ldap set-config
description: >
The `influxd-ctl ldap set-config` command uploads the specified LDAP configuration
to your InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap set-config` command uploads the specified LDAP configuration
to your InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl ldap set-config <ldap-config-toml>
```
## Arguments
- **ldap-config-toml**: LDAP configuration filepath or use `-` to read from _stdin_.
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
- [Apply an LDAP configuration from a file](#apply-an-ldap-configuration-from-a-file)
- [Apply an LDAP configuration from stdin](#apply-an-ldap-configuration-from-stdin)
### Apply an LDAP configuration from a file
```sh
influxd-ctl ldap set-config /path/to/ldap-config.toml
```
### Apply an LDAP configuration from stdin
```sh
cat ./ldap-config.toml | influxd-ctl ldap set-config -
```

View File

@ -0,0 +1,53 @@
---
title: influxd-ctl ldap verify
description: >
The `influxd-ctl ldap verify` command attempts to connect to and authenticate
with LDAP using the specified credentials and outputs a verbose log.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap verify` command attempts to connect to and authenticate
with LDAP using the specified credentials and outputs a verbose log.
## Usage
```sh
influxd-ctl ldap verify [flags] <username> <password>
```
## Arguments
- **username**: Username to authenticate with
- **password**: Password to authenticate with
## Flags {#command-flags}
| Flag | Description |
| :------------- | :--------------------------------------------------------- |
| `-ldap-config` | LDAP configuration filepath (use `-` to read from _stdin_) |
{{% note %}}
If `-ldap-config` is not provided, the command uses the LDAP configuration
stored on the server.
{{% /note %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
- [Verify LDAP authentication using a local configuration](#verify-ldap-authentication-using-a-local-configuration)
- [Verify LDAP authentication using the server configuration](#verify-ldap-authentication-using-the-server-configuration)
### Verify LDAP authentication using a local configuration
```sh
influxd-ctl ldap verify -ldap-config /path/to/ldap-config.toml username passw0rd
```
### Verify LDAP authentication using the server configuration
```sh
influxd-ctl ldap verify username passw0rd
```

View File

@ -0,0 +1,53 @@
---
title: influxd-ctl ldap warm-cache
description: >
The `influxd-ctl ldap warm-cache` command downloads LDAP group membership and
loads the cache on all InfluxDB Enterprise data nodes with that information.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl ldap
---
The `influxd-ctl ldap warm-cache` command downloads LDAP group membership and
loads the cache on all InfluxDB Enterprise data nodes with that information.
## Usage
```sh
influxd-ctl ldap warm-cache [flags]
```
## Flags
| Flag | Description |
| :-------- | :------------------------------- |
| `-cancel` | Cancel an in-progress cache warm |
| `-status` | Print cache warm status |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Warm the LDAP cache](#warm-the-ldap-cache)
- [View the status of cache warm operations](#view-the-status-of-cache-warm-operations)
- [Cancel an in-progress cache warm operation](#cancel-an-in-progress-cache-warm-operation)
### Warm the LDAP cache
```sh
influxd-ctl ldap warm-cache
```
### View the status of cache warm operations
```sh
influxd-ctl ldap warm-cache -status
```
### Cancel an in-progress cache warm operation
```sh
influxd-ctl ldap warm-cache -cancel
```

View File

@ -0,0 +1,106 @@
---
title: influxd-ctl leave
description: >
The `influxd-ctl leave` command removes a meta or data node from an InfluxDB
Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/join/
- /enterprise_influxdb/v1/tools/influxd-ctl/remove-data/
- /enterprise_influxdb/v1/tools/influxd-ctl/remove-meta/
---
The `influxd-ctl leave` command removes a meta or data node from an InfluxDB
Enterprise cluster.
The command searches for `influxd` and `influxd-meta` processes running on the
local machine bound to specific ports and determines if that process is an
InfluxDB meta or data node.
- **8088**: Data node
- **8091**: Meta node
{{% note %}}
If the InfluxDB data or meta processes are running on non-default ports, the
leave operation cannot detect them.
{{% /note %}}
{{% warn %}}
#### This command is destructive
`influxd-ctl leave` erases all metastore information from meta nodes and all
data from data nodes.
Only use this command if you want to _permanently_ remove a node from your
InfluxDB Enterprise cluster.
{{% /warn %}}
## Usage
```sh
influxd-ctl leave [flags]
```
## Flags {#command-flags}
| Flag | Description |
| :--- | :-------------------------- |
| `-y` | Assume `yes` to all prompts |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Remove nodes from a cluster](#remove-nodes-from-a-cluster)
- [Remove nodes from a cluster and assume yes to all prompts](#remove-nodes-from-a-cluster-and-assume-yes-to-all-prompts)
### Remove nodes from a cluster
In the following example, `influxd-ctl leave` detects the meta node running at
`cluster-node-03:8091` and the data node running at `cluster-node-03:8088` in
an existing InfluxDB Enterprise cluster and prompts the user to remove them.
```bash
influxd-ctl leave
```
###### Command output and interactive prompts
```txt
Searching for data node on cluster-node-03:8088...
Remove data node cluster-node-03:8088 from the cluster [y/N]: y
Removed cluster-node-03:8088 from the cluster
Searching for meta node on cluster-node-03:8091...
Remove meta node cluster-node-03:8091 from the cluster [y/N]: y
Successfully left cluster
* Removed data node cluster-node-03:8088 from cluster
* Removed meta node cluster-node-03:8091 from cluster
```
### Remove nodes from a cluster and assume yes to all prompts
In the following example, `influxd-ctl leave` detects the meta node running at
`cluster-node-03:8091` and the data node running at `cluster-node-03:8088` in an
existing InfluxDB Enterprise cluster and then, without prompting for input, removes them from the cluster:
```bash
influxd-ctl leave -y
```
###### Command output
```txt
Searching for data node on cluster-node-03:8088...
Removed cluster-node-03:8088 from the cluster
Searching for meta node on cluster-node-03:8091...
Successfully left cluster
* Removed data node cluster-node-03:8088 from cluster
* Removed meta node cluster-node-03:8091 from cluster
```

View File

@ -0,0 +1,37 @@
---
title: influxd-ctl node-labels
description: >
The `influxd-ctl node-labels` command and subcommands manage node labels in
an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/node-labels/
- /enterprise_influxdb/v1/tools/influxd-ctl/show/
---
The `influxd-ctl node-labels` command and subcommands manage node labels in an
InfluxDB Enterprise cluster.
**Node labels** are user-defined key-value pairs assigned to nodes in your
cluster that act as metadata for each node.
Node labels appear in the output of
[`influxd-ctl show`](/enterprise_influxdb/v1/tools/influxd-ctl/show/).
## Usage
```sh
influxd-ctl node-labels [flags]
```
## Subcommands
| Subcommand | Description |
| :---------------------------------------------------------------------- | :------------------------------------ |
| [delete](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/delete/) | Delete one or more labels from a node |
| [set](/enterprise_influxdb/v1/tools/influxd-ctl/node-labels/set/) | Set one or more labels on for a node |
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,38 @@
---
title: influxd-ctl node-labels delete
description: >
The `influxd-ctl node-labels delete` command deletes labels from an InfluxDB
Enterprise node.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl node-labels
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/node-labels/
---
The `influxd-ctl node-labels delete` command deletes labels from an InfluxDB
Enterprise node.
## Usage
```sh
influxd-ctl node-labels delete [flags]
```
## Flags
| Flag | Description |
| :-------- | :--------------------------------- |
| `-labels` | JSON array of label keys to delete |
| `-nodeid` | Node ID |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
```sh
influxd-ctl node-labels delete -nodeid 5 -labels '["hello"]'
```

View File

@ -0,0 +1,41 @@
---
title: influxd-ctl node-labels set
description: >
The `influxd-ctl node-labels set` command adds or updates labels on an
InfluxDB Enterprise node.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl node-labels
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/node-labels/
- /enterprise_influxdb/v1/tools/influxd-ctl/show/
---
The `influxd-ctl node-labels set` command adds or updates labels on an
InfluxDB Enterprise node.
Node labels appear in the output of
[`influxd-ctl show`](/enterprise_influxdb/v1/tools/influxd-ctl/show/).
## Usage
```sh
influxd-ctl node-labels set [flags]
```
## Flags
| Flag | Description |
| :-------- | :----------------------------------- |
| `-labels` | JSON object of label key-value pairs |
| `-nodeid` | Node ID |
{{% caption %}}
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
```sh
influxd-ctl node-labels set -nodeid 5 -labels '{"az":"us-west","nickname":"mars"}'
```

View File

@ -0,0 +1,53 @@
---
title: influxd-ctl remove-data
description: >
The `influxd-ctl remove-data` command removes a data node from an InfluxDB
Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/leave/
---
The `influxd-ctl remove-data` command removes a data node from an InfluxDB
Enterprise cluster.
{{% warn %}}
#### This command is destructive
`influxd-ctl remove-data` erases all data in the specified data node.
Only use this command if you want to _permanently_ remove a data node from your
InfluxDB Enterprise cluster.
{{% /warn %}}
_This command doesn't delete metadata related to the removed data node from other
nodes in the cluster. To remove all metadata about the removed data node, use
[`influxd-ctl leave`](/enterprise_influxdb/v1/tools/influxd-ctl/leave/)._
## Usage
```sh
influxd-ctl remove-data [flags] <data-bind-address>
```
## Arguments
- **data-bind-address**: TCP bind address of the data node to remove (`host:port`)
## Flags
| Flag | Description |
| :------- | :---------------------------------------------------------------------- |
| `-force` | Force the removal of a data node _(useful if the node is unresponsive)_ |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
```sh
influxd-ctl remove-data data-node-03:8088
```

View File

@ -0,0 +1,96 @@
---
title: influxd-ctl remove-meta
description: >
The `influxd-ctl remove-meta` command removes a meta node from an InfluxDB
Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/leave/
---
The `influxd-ctl remove-meta` command removes a meta node from an InfluxDB
Enterprise cluster.
By default, the local meta node is used to remove the specified node.
If `-bind` is specified, the bound address will be used.
To force-remove a meta node, bind to an existing meta node and include the the
`-tcpAddr` and `-force` flags along with the meta node's HTTP bind address.
Force removing a meta node should only be used if the meta node is no longer
reachable and is unrecoverable.
If the node is restarted after being force removed, it may interfere with the cluster.
{{% warn %}}
#### This command is destructive
`influxd-ctl remove-meta` erases all metadata in the specified meta node.
Only use this command if you want to _permanently_ remove a meta node from your
InfluxDB Enterprise cluster.
{{% /warn %}}
_This command doesn't delete metadata related to the removed meta node from other
nodes in the cluster. To remove all metadata about the removed meta node, use
[`influxd-ctl leave`](/enterprise_influxdb/v1/tools/influxd-ctl/leave/)._
## Usage
```sh
influxd-ctl remove-meta [flags] <meta-http-bind-addr>
```
## Arguments
- **meta-http-bind-addr**: HTTP bind address of the meta node to remove
## Flags {#command-flags}
| Flag | Description |
| :--------- | :---------------------------------------------------------------------- |
| `-force` | Force the removal of a meta node _(useful if the node is unresponsive)_ |
| `-tcpAddr` | TCP bind address of the meta node to remove |
| `-y` | Assume `yes` to all prompts |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
- [Remove the local meta node running on :8091](#remove-the-local-meta-node-running-on-8091)
- [Remove the meta node running on meta2:8091](#remove-the-meta-node-running-on-meta28091)
- [Forcefully remove an unresponsive meta node from the local meta node](#forcefully-remove-an-unresponsive-meta-node-from-the-local-meta-node)
- [Forcefully remove an unresponsive meta node through a remote meta node](#forcefully-remove-an-unresponsive-meta-node-through-a-remote-meta-node)
### Remove the local meta node running on :8091
```sh
influxd-ctl remove-meta localhost:8091
```
### Remove the meta node running on meta2:8091
```sh
influxd-ctl remove-meta meta2:8091
```
### Forcefully remove an unresponsive meta node from the local meta node
In the following example, the `influxd-ctl remove-data` command forcefully
removes the meta node running at the TCP address `meta2:8089` and HTTP address
`meta2:8091` from the cluster.
```sh
influxd-ctl remove-meta -force -tcpAddr meta2:8089 meta2:8091
```
### Forcefully remove an unresponsive meta node through a remote meta node
In the following example, the `influxd-ctl remove-data` command uses the meta
node at `meta1:8091` to forcefully remove the meta node running at the TCP
address `meta2:8089` and HTTP address `meta2:8091` from the cluster.
```sh
influxd-ctl -bind meta1:8091 remove-meta -force -tcpAddr meta2:8089 meta2:8091
```

View File

@ -0,0 +1,43 @@
---
title: influxd-ctl remove-shard
description: >
The `influxd-ctl remove-shard` command removes a shard from a data node in
an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/show-shards/
- /enterprise_influxdb/v1/administration/manage/clusters/rebalance/
---
The `influxd-ctl remove-shard` command removes a shard from a data node in
an InfluxDB Enterprise cluster.
{{% warn %}}
#### This command is destructive
Removing a shard from a data node is a destructive action and cannot be undone.
{{% /warn %}}
## Usage
```sh
influxd-ctl remove-shard <data-bind-address> <shard-id>
```
## Arguments
- **data-bind-address**: TCP bind address of the data node to remove the shard from
- **shard-id**: Shard ID to remove
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```sh
influxd-ctl remove-shard data-node-01:8088 31
```

View File

@ -0,0 +1,138 @@
---
title: influxd-ctl restore
description: >
The `influxd-ctl restore` command restores data backed up from an InfluxDB
Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/backup-and-restore/
- /enterprise_influxdb/v1/tools/influxd-ctl/backup/
---
The `influxd-ctl restore` command restores data backed up from an InfluxDB
Enterprise cluster.
`influxd-ctl restore` supports **full**, **incremental**, and **metadata-only** backups.
To restore from a full backup, include the `-full` flag and provide the path to
the backup manifest (`/path/to/backups/backup.manifest`).
To restore from an **incremental** or **metadata** backup, provide the path to
the directory that contains the backup files (`/path/to/backups`).
{{% note %}}
#### Destination database must be empty
The database data is restored to must be empty.
`influxd-ctl restore` will fail if the destination database contains data.
{{% /note %}}
## Usage
```sh
influxd-ctl restore [flags] <backup-location>
```
## Arguments
- **backup-location**: Location of backup-related files. They type of backup
you're restoring from determines the type and location of backup files:
- **Restore from a _full_ backup**: Provide the path to the backup manifest file
- **Restore from an _incremental_ backup**: Provide the directory path of the backup
- **Restore from a _metadata-only_ backup**: Provide the directory path of the backup
## Flags {#command-flags}
| Flag | Description |
| :--------------------------- | :---------------------------------------------------------------------------------------------------------- |
| `-db` | Database to restore _(if the backup contains more than one)_ |
| `-full` | Restore data from a full backup |
| `-list` | List the contents of the backup |
| `-meta-only-overwrite-force` | Restore _only metadata_ from a backup {{< req "Danger: [see below](#meta-only-overwrite-force)" >}} |
| `-newdb` | Change database name when restoring _(requires `-db` flag)_ |
| `-newduration` | Change retention policy duration (shard expiry) when restoring _(requires `-rp` flag, use 0s for infinite)_ |
| `-newrf` | New replication factor to use during restore _(limited by cluster size)_ |
| `-newrp` | Change retention policy name when restoring _(requires `-rp` flag)_ |
| `-newshard` | Shard ID to restore into _(if different from the shard ID in the backup)_ |
| `-rp` | Retention policy to restore _(if the backup contains more than one)_ |
| `-shard` | Shard ID to restore |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
<span id="meta-only-overwrite-force"></span>
{{% warn %}}
Only use the `-meta-only-overwrite-force` flag to restore from backups of the
destination cluster. Metadata includes shard assignments to data nodes, so if
you use this flag with metadata from a different cluster, **you will lose data**.
See [Back up and restore](/enterprise_influxdb/v1/administration/backup-and-restore/#restore-overwrite-metadata-from-a-full-or-incremental-backup-to-fix-damaged-metadata)
for instructions on using this flag.
{{% /warn %}}
## Examples
- [Restore from a full backup](#restore-from-a-full-backup)
- [Restore from an incremental backup](#restore-from-an-incremental-backup)
- [Restore from a metadata backup](#restore-from-a-metadata-backup)
### Restore from a full backup
```sh
influxd-ctl restore -full /path/to/full-backup/20230101T00000Z.manifest
```
{{< expand-wrapper >}}
{{% expand "View example output" %}}
```sh
Using manifest: /path/to/full-backup/20230101T00000Z.manifest
Restoring meta data... Done. Restored in 9.585639ms, 1 shards mapped
Restoring db telegraf, rp autogen, shard 2 to shard 2...
Copying data to <hostname>:8088... Copying data to <hostname>:8088... Done. Restored shard 2 into shard 2 in 48.095082ms, 569344 bytes transferred
Restored from my-full-backup in 58.58301ms, transferred 569344 bytes
```
{{% /expand %}}
{{< /expand-wrapper >}}
### Restore from an incremental backup
In this example, the `restore` command restores an incremental backup stored in the `my-incremental-backup/` directory.
```sh
influxd-ctl restore /path/to/incremental-backup/
```
{{< expand-wrapper >}}
{{% expand "View example output" "1" %}}
```sh
Using backup directory: /path/to/incremental-backup/
Using meta backup: 20230101T00000Z.meta
Restoring meta data... Done. Restored in 21.373019ms, 1 shards mapped
Restoring db telegraf, rp autogen, shard 2 to shard 2...
Copying data to <hostname>:8088... Copying data to <hostname>:8088... Done. Restored shard 2 into shard 2 in 61.046571ms, 588800 bytes transferred
Restored from my-incremental-backup/ in 83.892591ms, transferred 588800 bytes
```
{{% /expand %}}
{{< /expand-wrapper >}}
### Restore from a metadata backup
In this example, the `restore` command restores an metadata backup stored
in the `metadata-backup/` directory.
```sh
influxd-ctl restore /path/to/metadata-backup/
```
{{< expand-wrapper >}}
{{% expand "View example output" "2" %}}
```sh
Using backup directory: /path/to/metadata-backup/
Using meta backup: 20230101T00000Z.meta
Restoring meta data... Done. Restored in 21.373019ms, 1 shards mapped
Restored from my-incremental-backup/ in 19.2311ms, transferred 588 bytes
```{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -0,0 +1,57 @@
---
title: influxd-ctl show-shards
description: >
The `influxd-ctl show-shards` command returns information about shards in an
InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/tools/influxd-ctl/truncate-shards/
---
The `influxd-ctl show-shards` command returns information about shards in an
InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl show-shards [flags]
```
Information includes:
- Shard ID
- Database
- Retention Policy
- Number of desired replicas
- Shard group
- Shard start time
- Shard end time
- Shard expiration
- Shard owners
{{< expand-wrapper >}}
{{% expand "View example output" %}}
```sh
Shards
==========
ID Database Retention Policy Desired Replicas Shard Group Start End Expires Owners
51 telegraf autogen 2 37 2023-01-01T00:00:00Z 2023-01-08T00:00:00Z 2023-07-08T00:00:00Z [{26 data1:8088} {33 data3:8088}]
52 telegraf autogen 2 37 2023-01-01T00:00:00Z 2023-01-08T00:00:00Z 2023-07-08T00:00:00Z [{5 data2:8088} {26 data1:8088}]
```
{{% /expand %}}
{{< /expand-wrapper >}}
## Flags
| Flag | Description |
| :--- | :-------------------------------- |
| `-v` | Return detailed shard information |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples

View File

@ -0,0 +1,44 @@
---
title: influxd-ctl show
description: >
The `influxd-ctl show` command lists all nodes in an InfluxDB Enterprise cluster.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
---
The `influxd-ctl show` command lists all nodes in an InfluxDB Enterprise cluster.
## Usage
```sh
influxd-ctl show
```
#### Example output
```sh
Data Nodes
==========
ID TCP Address HTTP Address Version Labels Passive
4 data1:8088 data1:8086 v{{< latest-patch >}} {"az":"us-west"} false
5 data2:8088 data2:8086 v{{< latest-patch >}} {"az":"us-east"} false
Meta Nodes
==========
ID Raft Address HTTP Address Version Labels
1 meta1:8089 meta1:8091 v{{< latest-patch >}} {"az":"us-west"}
2 meta2:8089 meta2:8091 v{{< latest-patch >}} {"az":"us-west"}
3 meta3:8089 meta3:8091 v{{< latest-patch >}} {"az":"us-east"}
Raft Status
==========
Leader meta1:8089
Peers ["meta2:8089", "meta3:8089"]
```
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._

View File

@ -0,0 +1,48 @@
---
title: influxd-ctl token
description: >
The `influxd-ctl token` command generates a signed [JSON Web Token (JWT)](https://jwt.io/).
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
---
The `influxd-ctl token` command generates a signed [JSON Web Token (JWT)](https://jwt.io/).
## Usage
```sh
influxd-ctl -auth-type jwt -secret <shared secret> token [flags]
```
{{% note %}}
#### Requires global flags
`influxd-ctl token` requires the `-auth-type` and `-secret`
[global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags).
- Set `-auth-type` to `jwt`
- Use `-secret` to provide your JWT shared secret
{{% /note %}}
## Flags {#command-flags}
| Flag | Description |
| :----- | :---------------------------------------------- |
| `-exp` | Token expiration duration _(default is `1m0s`)_ |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
##### Generate a JWT token that expires in 5 minutes
```sh
influxd-ctl \
-auth-type jwt \
-secret sHaR3dS3cRe7 \
token -exp 5m
```

View File

@ -0,0 +1,42 @@
---
title: influxd-ctl truncate-shards
description: >
The `influxd-ctl truncate-shards` command truncates all shards that are currently
being written to (also known as "hot" shards) and creates new shards to write
new data to.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
related:
- /enterprise_influxdb/v1/administration/manage/clusters/rebalance/
- /enterprise_influxdb/v1/tools/influxd-ctl/show-shards/
---
The `influxd-ctl truncate-shards` command truncates all shards that are currently
being written to (also known as "hot" shards) and creates new shards to write
new data to.
## Usage
```sh
influxd-ctl truncate-shards [flags]
```
## Flags
| Flag | Description |
| :------- | :------------------------------------------------------- |
| `-delay` | Duration from now to truncate shards _(default is 1m0s)_ |
{{% caption %}}
_Also see [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
{{% /caption %}}
## Examples
##### Truncate shards 3 minutes after command execution
```bash
influxd-ctl truncate-shards -delay 3m
```

View File

@ -0,0 +1,34 @@
---
title: influxd-ctl update-data
description: >
The `influxd-ctl update-data` command updates a data node's TCP bind address
in the meta store.
menu:
enterprise_influxdb_v1:
parent: influxd-ctl
weight: 201
---
The `influxd-ctl update-data` command updates a data node's TCP bind address
in the meta store.
## Usage
```sh
influxd-ctl update-data <old-tcp-bind-addr> <new-tcp-bind-addr>
```
## Arguments
- **old-tcp-bind-addr**: Old TCP bind address of the data node
- **new-tcp-bind-addr**: New TCP bind address of the data node
## Flags
_See [`influxd-ctl` global flags](/enterprise_influxdb/v1/tools/influxd-ctl/#influxd-ctl-global-flags)._
## Examples
```sh
influxd-ctl update-data data1:8088 influxdb-data-01:8088
```