Delete all objects of a specific tenant which have a deletion flag.
This command may be useful, e.g., if due to unforeseen circumstances objects were flagged for deletion, but this deletion did not happen for unknown reasons. Such states can be recognized by the maintain-compare Command. Using this command will help to clean up those inconsistent object states.
The command will continuously run for a specified amount of time, determines the objects that were flagged for deletion in Elasticsearch index and delete them, including all references into the yuuvis system, that may still exist. This means that it is ensured all flagged objects are deleted from Elasticsearch index, and, if necessary, from the database and the repository. In addition, all old versions are deleted too. If no further object is found, the command will stop even if the maximum running time is not yet exceeded.
The following parameters can be given to the maintain-
delete command:
Parameter | Argument Type | Description | Required | Default | Example |
---|---|---|---|---|---|
--tenant <arg> | string | Tenant for which flagged objects should be searched and deleted. | yes | - | --tenant default |
| string | Target directory for result log. | no | - | --target-directory C:\Users\myusername\ymdeletionlog |
--fetch-size <arg> | int | Fetch size for Elasticsearch requests. Maximum number of objects included in each Elasticsearch request. The value must be at least 1 and not bigger than 10000. | no | 1000 | --fetch-size 50 |
--running-time <arg> | int | The maximum amount of seconds this command is allowed to run before stopping. The value must be at least 1 and not bigger than 86400. | no | 5 | --running-time 3600 |
--no-random | boolean | Setting this flag will prevent using a random seed to search for flagged objects. | no | false | --no-random |
Example
In the following example, all objects that were stored since 2021-09-01
by any user of tenant default
will be exported. Additionally, only 50 items should be stored in each folder, so a nesting strategy is used.
Lt. Commander>maintain-delete --tenant default --running-time 3600 Running delete job for tenant 'default' for 3600s
Any unexpected results will be continuously displayed while the process is running.