Spotfire® Server and Environment - Installation and Administration

Configuring automatic pruning of library versions

As an administrator, you can enable automatic pruning and specify a maximum number of unnamed versions to keep for library items.

About this task

Automatic pruning is useful if you, for example, want to enforce a continuous retention policy, instead of running manual cleanup commands. When the configured limit is exceeded, the oldest unnamed versions are removed automatically when new versions are created.

Note: Named versions are not counted against the limit and are not automatically deleted. Comments do not prevent a version from being pruned.

The pruning takes effect when a user saves a new version of a file. Only configuring automatic pruning does not affect the version history immediately.

Important: When you upgrade an existing Spotfire environment to 15.0 or later, the pruning properties are disabled by default. You can activate pruning by specifying the pruning properties after the upgrade. New installations use the default server configuration where pruning is enabled.

To change the versioning settings for a specific library item, see Changing version history settings for a library item.

Before you begin

You must have administrative credentials for Spotfire Server.

Procedure

  1. Open a command prompt and export the active configuration (the configuration.xml file) by using the export-config command.
  2. Enable automatic pruning:
    config set-config-prop --name="library.versioning.pruning.enabled" --value="true"

    By default, the maximum number of unnamed versions for a library item is 10. To change the default maximum, run the following command but change the value to the maximum you want:

    config set-config-prop --name="library.versioning.pruning.default-max-versions" --value="10"
    Note: If you have upgraded from an older version of Spotfire, the value of this property is set to -1 for backward compatibility reasons. You must manually set it to the suggested default "10" or some other value.
    Tip: Set the default to the number of unnamed versions you want to retain for most items. You can override the setting for individual items later, both in the installed Spotfire client and in the web administration pages.
  3. Import the configuration file back to the Spotfire database by using the import-config command.
  4. Restart the Spotfire Server.

Server configuration example

The following is an example of a server configuration where version history is enabled and automatic pruning keeps the 10 most recent unnamed versions for each item:

<configuration>
  <library>
    <versioning>
      <enabled>true</enabled>
      <disabled-types/>
      <pruning>
        <enabled>true</enabled>
        <default-max-versions>10</default-max-versions>
      </pruning>
    </versioning>
    ...
  </library>
  ...
</configuration>

What to do next

For one-time cleanup of older versions that already exist, use the delete-library-versions command.