Importing is only supported for database backed Flipt instances.
flipt import and flipt export support the --address and --token flags to enable transferring data to and from Flipt instances via the API instead of requiring a direct database connection.
HTTP and gRPC are supported by the --address flag.
Import
To import data into Flipt, use theflipt import command. You can either import from a file or from STDIN.
To import from STDIN, Flipt requires the --stdin flag:
--stdin, Flipt requires the file to be imported as an argument:
Namespaces are inferred from the YAML documents themselves. If a namespace
your document refers to doesn’t exist in the database, it will be created.
name and description from the document’s namespace object. If namespace is only a key, Flipt uses the key as the name. See Defining Flag State for both forms. Importing doesn’t change the name or description of a namespace that already exists, including the default namespace.
This command supports the --drop flag that will drop all data in your Flipt database tables before importing. This is to ensure that no data collisions occur during the import.
See the CLI reference for more information on the import command.
Export
To export Flipt data, use theflipt export command.
By default, export will output to STDOUT:
namespace object that holds its key, name, and description, so importing the file into another Flipt instance creates any missing namespace with the same name and description. When you export several namespaces, each one is written as a separate YAML document in the same output.
You can also export to a file using the -o filename or --output filename
flags:
default namespace. Use the flag --namespaces to export from a different namespace or multiple namespaces.
--sort-by-key flag can be used.
export command.