CLI Import & Export

This page describes import end exporting resources from Lenses to YAML via the CLI.

The CLI allows you to import and export resources to and from files.

Import is done on a per-resource basis, the directory structure defined by the CLI. A base directory can be provided by the —dir flag.

Processors, connectors, topics, and schemas have an additional prefix flag to restrict resources to export.

#export
lenses-cli export acls --dir my-dir
lenses-cli export alert-channels --dir my-dir
lenses-cli export alert-settings --dir my-dir
lenses-cli export connections --dir my-dir
lenses-cli export connectors --dir my-dir
lenses-cli export processors --dir my-dir
lenses-cli export quota --dir my-dir
lenses-cli export schemas --dir my-dir
lenses-cli export topics --dir my-dir
lenses-cli export policies --dir my-dir
lenses-cli export groups --dir my-dir
lenses-cli export serviceaccounts --dir my-dir

#import
lenses-cli import acls --dir my-dir
lenses-cli import alert-channels --dir my-dir
lenses-cli import alert-settings --dir my-dir
lenses-cli import connections --dir my-dir
lenses-cli import connectors --dir my-dir
lenses-cli import processors --dir my-dir
lenses-cli import quota --dir my-dir
lenses-cli import schemas --dir my-dir
lenses-cli import topics --dir my-dir
lenses-cli import policies --dir my-dir
lenses-cli import groups --dir my-dir
lenses-cli import serviceaccounts --dir my-dir

Directory structure

The expected directory structure is:

my-dir
├── alert-settings
│   └── alert-setting.yaml
├── apps
│   ├── connectors
│   │   ├── connector-1.yaml
│   │   └── connector-2.yaml
│   └── sql
├── groups
│   └── groups.yaml
├── kafka
│   ├── quotas
│   │   └── quotas.yaml
│   └── topics
│       ├── topic-1.yaml
│       └── topic-2.yaml
├── policies
│   └── policies-city.yaml
├── service-accounts
│   └── service-accounts.yaml
└── schemas
    ├── schema-1.yaml
    └── schema-2.yaml

SQL Processors

Only the update of name, cluster name, namespace, and runner are allowed. Changes to the SQL are effectively the creation of a new Processor.

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.