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.
To retrieve the name of the soft delete policy in effect, use the
get-global-configuration-prop option with
In this example, the soft delete policy is called
$ bin/dsconfig get-global-configuration-prop \ --property soft-delete-policy
To set the retention time or retained number of soft-deleted entries, use the
set-soft-delete-policy-prop option with
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"
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
If it has not been assigned yet, assign the soft delete policy to the global
This example assigns
default-soft-delete-policyto the global configuration.
$ bin/dsconfig set-global-configuration-prop \ --set soft-delete-policy:default-soft-delete-policy