iagctl db export
Export resources and services to a file.
The iagctl db export command exports services and resources to a file. Use this command to move services and resources from one gateway instance to another.
The export includes encrypted secrets and users, in addition to services and resources. Consider this before you commit an export file to source control.
Syntax
Examples
Export to the terminal
The following example exports all services and resources and displays the output in the terminal:
Export in a specific format
Use the -f flag to switch between JSON and YAML output. YAML is the default format:
Export to a file
Use the --file flag to save the output to a file:
Service file format
Secrets in an exported file are encrypted. You can import them to any Gateway that uses the same encryption key file. To add new local secrets, use iagctl create secret instead of editing the export file.
The following example shows the structure of an exported service file: