CLI Commands

cnspec migrate

Migrate the cnspec CLI configuration to the latest version.

Update an existing cnspec configuration file to the settings the current release expects.

The providers_url configuration key is deprecated in favor of updates_url. cnspec still honors providers_url, but warns each time it runs. If your configuration file sets providers_url, this command adds an updates_url derived from it by dropping the trailing /providers. It only migrates a providers_url that is an http(s) URL ending in /providers. It leaves providers_url in place, so you can remove it once every agent that shares the configuration runs the new version. updates_url also selects where cnspec downloads its own binary updates, so make sure the host you point it at serves the release manifests and not only providers.

If there's nothing to migrate, the command reports that no migration is needed.

cnspec migrate [flags]

Options

  -h, --help   help for migrate

Options inherited from parent commands

      --api-proxy string        Set the proxy for communications with Mondoo Platform API
      --auto-update             Enable automatic provider installation and update (default true)
      --config string           Set config file path (default $HOME/.config/mondoo/mondoo.yml)
      --log-level string        Set the log level: error, warn, info, debug, trace (default "info")
      --logging-config string   Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
      --strict                  Default MQL strict mode for policies that do not declare one: every link in an MQL chain must resolve
  -v, --verbose                 Enable verbose output

SEE ALSO

On this page