dhconfig properties

The properties (or property) configuration data type of the dhconfig tool works with properties files stored in the system. properties also handles other types of configuration files, such as status-dashboard-defaults.json.

As with other dhconfig configuration data types, the --help argument provides detailed information on the available actions and arguments, as well as usage examples. Use --help whenever you need more information about the available options. For example, if you want information about the import action, you can run:

Which prints the following:

...followed by a description of all of the subcommand's arguments and some usage examples.

Due to the number of available options and combinations, and the robust in-tool documentation via --help, an exhaustive list of all possible commands is not provided here. Instead, we will elaborate on some of the more complex arguments below, and then give some usage examples. We recommend that you use the --help argument as needed for more information.

Arguments

ArgumentDescription
-r,--rename <arg>When importing from a single file, assign a new name when stored in the system.
-u,--update-on-sameWhen importing a file, update the system even if the file contents are unchanged.
-force,--forceWhen a properties file is imported, dhconfig also validates the file like the validate action. The --force option can be used to import a file that has apparent errors. Use with care because this can cause problems later.

Examples

export

Export all properties files to /tmp:

Export all properties files to /tmp, bypassing configuration service:

Note

Bypassing configuration server: When you use the --etcd option, dhconfig connects directly to the etcd database, skipping the Configuration Server. This should only be done by administrators with the necessary permissions and is typically used for troubleshooting or recovery when the Configuration Server is unavailable.

Print iris-environment.prop:

Export iris-environment.prop to local file:

Export iris-environment.prop and iris-endpoints.prop to /tmp:

import

Note

Import actions require authentication, with sudo, --key, or --user.

Import my_properties.prop as iris-environment.prop:

Import several properties files from /tmp:

Import iris-environment.prop from /tmp:

or:

list

List all properties files in the system:

validate

Use validate to check a properties file for errors without importing. This process parses the file to expose syntax errors and checks for common user errors, such as smart quotes and non-breaking spaces that can be inserted via cut-and-paste from formatted sources.

Validate a file without importing it:

delete

Note

Delete actions require authentication, with sudo, --key, or --user.

Delete a properties file: