7.12. Importing and exporting policiesΒΆ

You can export and import the policies. This can be done from the policy tab in the WebUI or from the policy dialog in the GTK client.

Note

When exporting policies always all policies are exported.

The policies are written to a file in a config file format. Each section of a this export file is the name of the policy. The key/value-pairs in such a section are the settings of this policy.

You can edit the policy file in your preferred editor and import the policy again. Exporting and importing policies is helpful to backup policies or to transfer policies from one system to another or the prepare the policy definitions in a text file and import these ready made policies to your LinOTP system.

Note

When importing policies existing policies are not flushed. The imported policies are added to the already existing policies. If a policy with the same name already exist, then this policy gets overwritten by the imported policy.

Warning

The WebUI imports the policy file as a whole while the GTK client imports one policy after another. So if a first policy defines that your admin user has no write access to the system config, importing the later policies will fail! This only happens with the GTK client!

See Best practice - policy example for policy examples.