In this section · 2 articles

Delete entries and choose how long they're kept

Set how many days Laramin keeps Activity Log entries before it deletes them, delete entries by hand, and remove one person's entries when they ask.

Applies to
Activity Log 1.2 and later
Who can do this
Platform owner
Permission
feature.activitylog.user.delete
Where
Activity Logs › User Activities
On this page

Before you start

  • To change how long entries are kept, you need to be a super admin, or hold Edit on the Activity Logging settings panel (feature.core.logging.edit). The built-in Administrator role doesn't include it.
  • To delete entries, you need the delete permissions of that list, for example Delete User Activity (feature.activitylog.user.delete) and Bulk Delete User Activities (feature.activitylog.user.bulk_delete). Login Activities has its own pair.
  • Deleting entries can't be undone, and it isn't recorded anywhere. Give the delete permissions only to people you trust with the audit trail.

Choose how long entries are kept

  1. Open the Settings hub, for example from Configurations › General Settings.

  2. In the list of panels, under Developer, select Activity Logging.

    Activity Logging settings panel with the Provider set to MySQL (default), Write Asynchronously on, Dual-Write to MySQL off, and Retention (days) set to 365 highlighted.
  3. In Retention (days), enter the number of days to keep entries, from 1 to 3650. The default is 365.

  4. Select Save changes.

Once a week, Laramin deletes User Activities and Login Activities entries older than that, wherever they're stored. The weekly clean-up runs with your Laramin's scheduled jobs. Developer Tools › Scheduler shows when each job last ran. If scheduled jobs don't run, nothing is deleted. See Scheduled jobs don't run.

Visitor Activities isn't affected by this setting. Its sessions are cleared after they end. See What the Activity Log records.

The same panel has three more settings:

SettingWhat it does
ProviderWhere entries are stored: MySQL (default), MongoDB or BigQuery. The lists read from the provider you choose. With BigQuery, Activity Log entries still go to MySQL. Test a provider before you switch to it.
Write AsynchronouslyQueues log writes so pages stay fast. Activity Log entries always go through the queue, whatever this says. If your queue runs in the background, entries appear once the queue worker has written them.
Dual-Write to MySQLAlso writes every entry to MySQL while you use another provider.

Delete one entry

  1. In Activity Logs › User Activities or Login Activities, open the entry's row actions.

  2. Select Delete, then confirm.

    Delete confirmation asking to apply "Delete" to the selected record, with Cancel and a red Delete button.

The entry is gone for good. There's no trash for Activity Log entries.

Delete several entries

  1. Filter the list to the entries you want to delete.

  2. Tick their rows. To include every entry that matches the filter, select Select all in the selection bar.

  3. Select Delete Selected.

  4. Type DELETE and confirm.

    User Activities with three entries ticked and 3 of 918 selected in the selection bar, Delete Selected highlighted, and the confirmation open with DELETE typed in the box.

See Delete, restore and act on records in bulk for how selecting across pages works.

Remove one person's entries

Deleting or anonymizing an account doesn't delete that person's entries. If someone asks you to remove their data, remove their entries yourself:

  1. In User Activities, filter User to the person. After their account is anonymized, they're listed as Anonymized User.
  2. Select all matching entries, select Delete Selected, and confirm.
  3. Do the same in Login Activities.

Entries made while someone was signed in as that person are listed under that person too. Entries stay in database backups made before you deleted them. See Handle account deletion requests for the rest of the account.

Careful: Check with whoever is responsible for privacy in your business before you delete audit entries. You may have to keep some of them, for example to investigate an incident.

What happens next

The lists show the remaining entries. If you lowered Retention (days), older entries disappear after the next weekly clean-up.