Skip to content

export policy

Chris Lowth edited this page Sep 21, 2022 · 9 revisions

export policy, export policies

Usage:

tbutil [{cred}] export automation policy [-j|-s ..|-y] [-by-name] [-src ..] [-defaults] {policy_uuid_or_name}
tbutil [{cred}] export placement policy [-j|-s ..|-y] [-by-name] [-src ..] {policy_id_or_name}
tbutil [{cred}] export [all] automation policies [-v] {directory_name}
tbutil [{cred}] export [all] placement policies [-v] {directory_name}

Singular Versions

These commands export the specified placement or automation policy by printing a JSON document that can be used to re-import the same policy using "import policy. The policy can be specified by name (if the -by-name option is used) or ID, which can be discovered using list policies".

If any of the allowed common formatting options are specified, then the output is the unprocessed output of the API call used. The resulting text is NOT suitable to be imported using "import policy".

The supported formatting flags are -j, -s and -y (see common formatting options)

The -src option can be used to read policy data in from the specified json file (which must have been created using the "list policies" command using the -j option).

The -defaults option causes the exported data to contain the default values for the policy rather than the configured values.

Plural Versions

These commands create the specified directory (which must not already exist) and record the exported details of the policies in files in there. The directory is suitable for importing using the "import policies" commands.

The "all" option causes the commands to include policies that should not be included when re-importing. This typically includes policies that are created by the target probes during discovery. These should normally be excluded in most export/import workflows because they are created automatically by the system itself.

The -v option causes the export files to contain the full, unmodified DTO structures for the policies. Files created using this option are NOT suitable for re-importing.

See also: "delete policy", "import policy", "list policies", "print policy changes", "reset policy"

Clone this wiki locally