pkg export all filter, resolves #803
parent
88c0d34723
commit
ee5f067641
|
@ -79,6 +79,21 @@ influx pkg export all \
|
|||
-t $INFLUX_TOKEN
|
||||
```
|
||||
|
||||
#### Export resources filtered by labelName or resourceKind
|
||||
The `influx pkg export all` command has an optional `--filter` flag that filters
|
||||
only exports resources that match a specified `labelName` or `resourceKind`.
|
||||
|
||||
###### Export only buckets with a specific label name
|
||||
```sh
|
||||
influx pkg export all \
|
||||
-o my-org \
|
||||
-f ~/templates/awesome-template.yml \
|
||||
-t $INFLUX_TOKEN \
|
||||
--filter=resourceKind=Bucket \
|
||||
--filter=labelName=Example
|
||||
```
|
||||
|
||||
|
||||
For information about flags, see the
|
||||
[`influx pkg export all` documentation](/v2.0/reference/cli/influx/pkg/export/all/).
|
||||
|
||||
|
|
|
@ -17,11 +17,12 @@ influx pkg export all [flags]
|
|||
```
|
||||
|
||||
## Flags
|
||||
| Flag | Description | Input Type | {{< cli/mapped >}} |
|
||||
|:---- |:----------- |:---------- |:------------------ |
|
||||
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
|
||||
| `-h`, `--help` | Help for the `export` command | | |
|
||||
| `-o`, `--org` | The name of the organization that owns the resources | string | `INFLUX_ORG` |
|
||||
| `--org-id` | The ID of the organization that owns the resources | string | `INFLUX_ORG_ID` |
|
||||
| Flag | Description | Input Type | {{< cli/mapped >}} |
|
||||
|:---- |:----------- |:---------- |:------------------ |
|
||||
| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | |
|
||||
| `--filter` | Filter exported resources by labelName or resourceKind (format: `--filter=labelName=example`) | list of strings |
|
||||
| `-h`, `--help` | Help for the `export` command | | |
|
||||
| `-o`, `--org` | The name of the organization that owns the resources | string | `INFLUX_ORG` |
|
||||
| `--org-id` | The ID of the organization that owns the resources | string | `INFLUX_ORG_ID` |
|
||||
|
||||
{{% cli/influx-global-flags %}}
|
||||
|
|
Loading…
Reference in New Issue