PingDirectory

Configuring soft-delete automatic purging

By default, PingDirectory server retains soft-deleted entries indefinitely.

For companies that want to set up automatic purging of soft-deleted entries, the server provides two configurable properties on the soft delete policy: the maximum retention time for all soft-deleted entries and the retained number of soft-deleted entries.

These changes take effect without requiring a server restart.

Configuring soft-delete automatic purging

About this task

To enable automatic purging, you can change the retention time, the retained number of entries, or both. By default, both are set to an indefinite retention time and number of entries. The time unit of milliseconds (ms), seconds (s), minutes (m), hours (h), days (d), or weeks (w), can be preceded by an integer to specify a quantity for that unit, such as "1 d", "52 w", etc.

After you configure the properties, the changes take effect immediately without the need for a server restart.

The server deletes all of the soft-deleted entries according to the policy in effect. If the policy is changed while entries are in the process of being deleted, the new policy takes effect after the in-process batch of entries is deleted and applies to any remaining soft-deleted entries going forward, according to the new policy.

Steps

  1. To retrieve the name of the soft delete policy in effect, use the get-global-configuration-prop option with dsconfig.

    Example:

    In this example, the soft delete policy is called default-soft-delete-policy.

    $ bin/dsconfig get-global-configuration-prop \
      --property soft-delete-policy
  2. To set the retention time or retained number of soft-deleted entries, use the set-soft-delete-policy-prop option with dsconfig.

    Example:

    This example shows how to set the retention time for soft-deleted entries.

    $ bin/dsconfig set-soft-delete-policy-prop \
      --policy-name default-soft-delete-policy \
      --set "soft-delete-retention-time:52 w"

    Example:

    This example shows how to set the retained number of soft-deleted entries.

    $ bin/dsconfig set-soft-delete-policy-prop \
      --policy-name default-soft-delete-policy \
      --set soft-delete-retain-number-of-entries:1000000
  3. If it has not been assigned yet, assign the soft delete policy to the global configuration.

    Example:

    This example assigns default-soft-delete-policy to the global configuration.

    $ bin/dsconfig set-global-configuration-prop \
      --set soft-delete-policy:default-soft-delete-policy

Disabling soft-delete automatic purging

About this task

The change takes effect immediately without the need of a server restart. If the server is in the middle of an automatic soft-delete purging, it might continue to purge entries until the next time it evaluates the soft delete policy.

Steps

  • To disable soft-delete automatic purging, use the set-soft-delete-policy option with dsconfig.

  • To reset the soft delete policy properties that control automatic purging, use the set-soft-delete-policy-prop with dsconfig.

    Example:

    This example resets the soft-delete-retention-time and soft-delete-retain-number-of-entries properties.

    $ bin/dsconfig set-soft-delete-policy-prop \
      --policy-name default-soft-delete-policy \
      --reset soft-delete-retention-time \
      --reset soft-delete-retain-number-of-entries