maintain-tenant-data-delete Command

Deletes all data belonging to a tenant of the core system, including all objects in the repository, database, Elasticsearch, audit entries and config files.

This command may be useful if all data of a tenant should be deleted. Before using this command, you should ensure that the tenant is already disabled for user login, to prevent any unexpected data manipulations while the deletion process is running. Please note that this operation cannot be undone and that there is no automatic data backup. Even objects under retention will be deleted. However, if binary content files are protected by an archive-internal retention, they cannot be deleted via this command.

While the command runs continuously, the deletion of DMS objects is performed step by step. Each day between the object creation date and the current date is separately processed. Then again, each day is split in a variable number of time periods, such that the amount of objects to be deleted in each period is approximately equal to the number of fetch-size. For each period, the command follows this procedure:

  • Process all current object versions:
    • Delete each repository item, i.e., binary content files. (individual requests)
    • Delete the objects in the Elasticsearch index. (batch request)
    • Delete all database rows. (batch request)
  • Process all old versions of DMS objects:
    • Delete each repository item, i.e., binary content files. (individual requests)
    • Delete all database rows. (batch request)

If one of the deletion sub-processes (in repository, search index or database) fails for a DMS object, the problem is logged and the deletion continues with the other sub-processes nevertheless.

After all time periods of a day are finished, all audit entries of this day are deleted. Then, the procedure is repeated for the next day until the current date has been processed. Depending on the number of objects for the tenant, this process can take a long time. While running the task, the process progress is continuously displayed including an estimated completion time.

After processing all days, as a last step, the tenant's configuration is deleted.

The following parameters can be given to the maintain-tenant-data-delete command:

ParameterArgument TypeDescriptionRequiredDefaultExample
--tenant <arg>stringTenant for which all data should be deleted.yes---tenant default

--target-directory <arg>

string

Target directory for result log.

no---target-directory C:\Users\myusername\ymtenantdeletionlog
--fetch-size <arg>int

Fetch size, used to split days in time periods. Each period contains approximately as many elements as specified by fetch-size.

The value must be at least 100 and not bigger than 10,000.

no1000--fetch-size 500
--what-ifbooleanSetting this flag will prevent the execution of the deletion. The process will be simulated in order to count all documents that would be deleted without this flag.nofalse--what-if
--skip-confirmationbooleanSetting this flag will skip the initial warning that all data will be deleted.nofalse--skip-confirmation

Example

In the following example, all objects of the tenant default will be deleted. Each day is split in time periods which contain approximately 500 objects.

Example
Lt. Commander>maintain-tenant-data-delete --tenant default --fetch-size 500
Running tenant delete job for 'default'

Any unexpected results will be continuously displayed while the process is running.