Asset Deletion 3 - Configure server actions for deletion
There is an automatic server action to perform the deletion process in Asset Deletion 3. Besides that, an individual server action deals with single assets. This article explains how to configure server actions. It also covers different environments like a single server or master remote installations.
Context
Asset deletion 3 is the successor of Asset Deletion 1 and 2.
The configuration for Asset Deletion 3 consists of three parts:
Create asset version policies: Define, which asset types and domains are processed by the asset deletion process.
Configuration of the Asset Deletion 3 report: Use the report to check how an asset version policy is applied for an asset. See all constraints that prevent versions to be deleted.
Configuration of the two deletion server actions: The automatic server action cleans up the whole database and affected asset files. The individual server action executes on a single asset.
Prerequisites
Administration rights for the censhare Admin Client.
Understanding of the deletion process in Asset Deletion 3.
Basic understanding of censhare, especially assets, asset relations, asset types, and domains.
Introduction
You can configure two server actions:
Delete Asset Version (automatic): The server action executes the asset deletion process for the whole database. It runs in defined intervals defined by a cron pattern.
Delete Asset Versions (individual): The server action executes the deletion process for individual assets and is started manually. The user action is available in the censhare Client.
Both server actions execute the three parts of the deletion process:
Mark asset versions
Delete asset versions
Delete storage items
Each part of the deletion process has a limited execution time that is configured in the server action. If the time is over, the server stops the execution and continues with the next part. The server does not stop immediately but finishes all steps of the actual round of the actual executed deletion part.
The first and the second part of the deletion process run on the relational database. Therefore, they must be configured on one Server only. The third part runs on the asset file system of the censhare Server: It deletes the asset files that are listed in the storage_deletion_queue table in the database. This part must be configured on each censhare Server with a local asset file system.
The configuration also depends on the environment of your censhare installation.
You can configure a third server action:
Asset Deletion 3 Report: It reports all versions for an asset that have constraints and cannot be deleted as of that. For more information on the Asset Deletion 3 Report.
Server action: Delete Asset Versions (automatic)
No parallel execution with Asset Deletion 1
Asset Deletion 1 and Asset Deletion 3 are not allowed to run in parallel. If any automatic server action of Asset Deletion 1 is activated, censhare does not execute Asset Delete Versions (automatic) of Asset Deletion 3.
When you activate any automatic server action in Asset Deletion 1 or 3, there is no check in the configuration. You receive no warning if there is any activated automatic server action in the other Asset Deletion module. There is only a warning text in the configuration dialog for the automatic server actions in Asset Deletion 1 and 3: "Only one of Asset Deletion / Asset Deletion 3 must be activated."
Before executing the Asset Delete Versions (automatic) server action of Asset Deletion 3, censhare checks for Asset Deletion 1. censhare does not execute if any automatic server action in the Asset Deletion 1 module is activated. Instead, censhare writes a message into the server log.
Configure
In the censhare Admin Client, go to the "Configuration/Modules/Asset Deletion 3" folder.
Open the Delete Asset Versions (automatic) entry.
Enter the desired values.
Click OK.
Update the Master Server and Remote Servers if existing.
Configuration settings
Field | Attribute field | Mandatory | Description |
Server name | - | No | Select the name of the Server on which you want to execute the command. |
Enabled | - | No | Select to activate the command. |
Run only on the master server | - | No | Remote-Server environment. With Asset Deletion 3, a configuration is not only required on the Master Server but on each server with its own local storage. Do not enable this option. Create a configuration on each server separately where necessary |
Cron pattern | - | Yes | Set the execution time for Delete Asset Versions (automatic) via cron pattern. An empty field causes a server error. |
Mark asset versions | - | No | Performs the first part of the deletion process. Important: This must run on one censhare Server only. Typically, this is the Master Server. |
Run for | Yes | Set the execution time for Mark asset versions. | |
Delete asset versions | - | No | Performs the second part of the deletion process. Important: This must run on one censhare Server only. Typically, this is the Master Server. |
Run for | Yes | Set the execution time for Delete asset versions. | |
Delete storage item | - | No | Performs the third part of the deletion process. Important: Check this option if the server has its own local attached file storage for assets. Create a configuration entry for each server with local storage. |
Run for | Yes | Set the execution time for Delete storage items. | |
Live-tag-check | - | No | Check this option, if you have an online channel installation. It prevents the deletion of assets that are published. This is done by checking the live-tag flag of an asset. |
Note: Mark asset versions and Delete asset versions can be configured without the Delete storage item action. In this case, only asset versions are deleted, but no corresponding storage items.
Note: If you enable only the Delete storage items action without the first two parts, it deletes only storage items that are already in the deletion list of the database. No storage items are added to the list by the deletion process.
Set execution time
To run the automatic Server action, you must define a cron pattern. This is done in the Cron pattern field in the configuration dialog:
Field | Allowed values |
Minute | 0-59 |
Hour | 0-23 |
Day of month | 1-31 |
Month | 1-12 (or names) |
Day of week | 0-7 (0 or 7 is Sun, or use names) |
Use an asterisk (*) for "first-last''. For example, the pattern "0 4 * * *" starts the command every day at 4 a.m. For more information, execute "man 5 crontab" in a terminal window.
Server action: Delete Asset Versions (individual)
To configure the server action, in the censhare Admin Client, open Delete Asset Versions (individual) in the Asset Deletion 3 module in "Configuration/Modules/Asset Deletion 3".
Configuration
The configuration has the same settings as Delete Asset Versions (automatic), except for the cron settings.
Execute
censhare Client
In the censhare Client, select the asset on which you want to run Asset Deletion 3.
Click Server actions and select Delete asset versions (individual): A report shows a summary of the action.
Note: If there is no asset version policy that matches, you do not receive a warning. No asset version is marked for deletion.
Note: Run the Asset Deletion 3 report before running Delete asset versions (individual). The report shows which asset versions are skipped. If no asset version policy applies, you receive a warning.
censhare Web
In censhare 2019.2, the Delete Asset Versions (individual) server action is not available in censhare Web.
Configuration of the Server environment
Note: Asset Deletion 3 is supposed to run on the censhare Server that accesses the database. Typically, this is the Master Server. The database must be located at the same place as the censhare Server. This is to have low latencies in the communication between censhare Server and the database.
Delete asset versions (automatic/manual)
The configuration of the server commands for Asset Deletion 3 depends on the setup of your censhare Server environment. The following setups are possible:
one single censhare Server (Master)
one central censhare Server (Master) and one or more censhare Servers (Remote) on other locations
a cluster of censhare Servers at one location
In any of the setups above, one censhare Server must be configured as Master Server. This server maintains the configuration. All other servers are Remote Servers. They receive their configuration from the Master Server.
In a single server environment, use the Update server configuration button in the censhare Admin Client to update the Master Server. In a multiple server environment, use the Synchronize remote servers button. This server action updates the Master Server in the first step and afterwards all Remote Servers.
Single Master Server
This server connects to the database and the file system. Enable all steps of the deletion process in the configuration:
Mark asset versions
Delete asset versions
Delete storage items
Distributed installation (automatic server action)
One censhare Server connects directly to the database. Typically, this is the Master Server. Remote Servers connect to the database via the Master.
On the Master Server, enable all three steps:
Mark asset versions
Delete asset versions
Delete storage items
For data integrity Mark asset versions and Delete asset versions must run on only one server.
On the Remote Servers with a local asset file system, enable only the third step:
Delete storage items
Distributed installation (manual server action)
On the Master Server, enable all three steps for the manual server action:
Mark asset versions
Delete asset versions
Delete storage items
On the Remote Servers with a local asset file system, do not enable the manual server action. But, set up the automatic server action and enable the third step:
Delete storage items
censhare Cluster
In a cluster, censhare Servers share one storage system where all asset files are stored. Only one server must execute the deletion process. Typically, this is the Master Server. On that server enable all three steps:
Mark asset versions
Delete asset versions
Delete storage items
On all other censhare nodes of the cluster, Asset Deletion 3 must not be configured. This is to maintain data integrity.
Result
You have configured the automatic and the individual server actions for Asset Deletion 3.
Next steps
Define asset version policies.
Check asset for constraints using the asset deletion report.