Introduction
From Platform Release 637, a new function, remove_user_data_ex
is being added to the Teramind standard Perl script, tm.pl
that comes with the On-Premise deployment package. This function will help you easily remove users’ data to meet GDPR compliance such as Right to erasure / Right to be forgotten (i.e., Article 17 and 19).
Notes
You can run the
remove_user_data_ex
function either on the Master node (a VM with the master role) or a BI node (a VM with the terabi role).You can run the function on the Master node only if there is no BI node.
The function removes data such as user activities, BI reports, etc. from the PostgreSQL and ClickHouse databases. It does not remove video recordings, captured email attachments, captured printed documents, etc.
Removing Data Manually
You can then delete the data using the following command:
/usr/local/teramind/scripts/tm.pl -func remove_user_data_ex [-keep_month N] [-computer COMPUTER_ID] [-user USER_EMAIL] [-y] [-no_disk_check]
Description of Parameters
Parameter | Description |
| This parameter will delete monitoring data older than
If you pass this parameter a
If you pass any negative number (e.g., |
| This parameter will delete data for a computer with the ID
For example,
If you use this parameter with the
If the
⚠️ You cannot use this parameter with the |
| This parameter will delete data for a user with the email address specified in the
If you use this parameter with the
If the
⚠️ You cannot use this parameter with the |
| If you use this parameter, the script will not ask you to confirm the delete operation. |
| Use this parameter if you don't have the main PostgreSQL database located on the Master node. Note that, if you use this parameter, you will have to ensure that the database has enough free space for the cleanup operations.
⚠️ This parameter is required for remote database(s). |
Examples
1. The following command will delete data older than 5 months (not including the current month) from a computer with an ID of 112:
/usr/local/teramind/scripts/tm.pl -func remove_user_data_ex -computer 112 -keep_month 5
2. This will delete all the data of a user who has the email address [email protected]:
/usr/local/teramind/scripts/tm.pl -func remove_user_data_ex -user [email protected]
3. This will delete all monitoring data of all users and computers:
/usr/local/teramind/scripts/tm.pl -func remove_user_data_ex -keep_month -1
Removing Data Automatically
You can set up a Cron job to automatically clean data on a regular basis by editing the user’s crontab
file:
1. Use the following command to open the crontab
file for editing:
crontab -e
2. Add the tm.pl
command with the remove_user_data_ex
function and the required parameters as needed in the crontab
file. For example, the command below will run the delete operation everyday at midnight. It will keep the last six months of monitoring data and delete the rest. It will also create an output log in case you want to capture any exceptions:
0 0 * * * /usr/local/teramind/scripts/tm.pl -func remove_user_data_ex -y -keep_months 6 -no_disk_check >>/usr/local/teramind/logs/remove_user_data.log 2>&1