deck gateway dump

Uses: deck
Related Documentation
Related Resources

decK can back up the configuration of your running Kong Gateway using the deck gateway dump command.

See the reference for Entities managed by decK to find out which entity configurations can be backed up.

The exact command that you need to run changes if you’re using Workspaces (on-prem only) or not.

The following commands will back up all of the configuration in to a single file. See tags to learn how to segment configuration.

Konnect

decK can export one control plane at a time from Konnect. To choose which control plane is backed up, specify the --konnect-control-plane-name flag:

deck gateway dump \
  -o $YOUR_CP_NAME.yaml \
  --konnect-control-plane-name $YOUR_CP_NAME \
  --konnect-token $KONNECT_TOKEN

Single workspace

If you’re using the default Workspace, decK automatically identifies the Workspace to back up:

deck gateway dump -o kong.yaml

To back up a different Workspace, pass the -w flag:

deck gateway dump -w $WORKSPACE_NAME -o $WORKSPACE_NAME.yaml

All workspaces

To back up all Workspaces, pass the --all-workspaces flag. This creates multiple files in the current directory. Each file is named the same as its Workspace:

deck gateway dump --all-workspaces

Command usage

Usage:
  deck gateway dump [flags]

Flags:
      --all-workspaces                        dump configuration of all Workspaces (Kong Enterprise only).
      --consumer-group-policy-overrides       allow deck to dump consumer-group policy overrides.
                                              This allows policy overrides to work with Kong GW versions >= 3.4
                                              Warning: do not mix with consumer-group scoped plugins
      --format string                         output file format: json or yaml. (default "yaml")
  -h, --help                                  help for dump
  -o, --output-file -                         file to which to write Kong's configuration.Use - to write to stdout. (default "-")
      --rbac-resources-only                   export only the RBAC resources (Kong Enterprise only).
      --select-tag strings                    only entities matching tags specified with this flag are exported.
                                              When this setting has multiple tag values, entities must match every tag.
      --skip-ca-certificates                  do not dump CA certificates.
      --skip-consumers                        skip exporting consumers, consumer-groups and any plugins associated with them.
      --skip-consumers-with-consumer-groups   do not show the association between consumer and consumer-group.
                                              If set to true, deck skips listing consumers with consumer-groups,
                                              thus gaining some performance with large configs. This flag is not valid with Konnect.
      --with-id                               write ID of all entities in the output
  -w, --workspace string                      dump configuration of a specific Workspace(Kong Enterprise only).
      --yes yes                               assume yes to prompts and run non-interactively.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!