Add the hability to recover removed entity log operations

Created on 23 April 2025, about 1 month ago

Problem/Motivation

On large sites using the log_entity_operations module, logs can accumulate quickly and reach the storage limit configured in the module settings. Once this limit is reached, older logs are removed from the database to prevent excessive growth.

Currently, there is no built-in mechanism to recover logs that have been deleted in this way, which can make troubleshooting, audits, or historical analysis more difficult.

Proposed resolution

Implement a system that allows administrators to:

  • Export (dump) logs that are about to be removed from the database to a file or series of files.
  • Import (restore) logs from these files back into the database when needed, making historical logs accessible again.

This solution could involve:

  • Configurable export paths and file formats (e.g., CSV, JSON).
  • Drush commands or UI buttons for both export and import actions.
  • Documentation and access control for secure handling of exported logs.
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Pipeline finished with Success
    about 1 month ago
    Total: 150s
    #479879
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    Ready to review

  • Pipeline finished with Success
    about 1 month ago
    Total: 142s
    #479915
  • Pipeline finished with Success
    about 1 month ago
    Total: 196s
    #479957
  • Pipeline finished with Success
    about 1 month ago
    Total: 132s
    #481218
  • Pipeline finished with Success
    about 1 month ago
    #481221
  • Pipeline finished with Success
    about 1 month ago
    Total: 133s
    #481226
  • Pipeline finished with Success
    about 1 month ago
    Total: 131s
    #481227
  • Pipeline finished with Success
    about 1 month ago
    Total: 137s
    #481236
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    Currently, the log entities are saved on a file archived_entity-YY-MM-DD.csv, but the date is when the file was created, and then, it does not match with the entity_logs, change the rotating file handler to use the entity logs dates.

  • Pipeline finished with Success
    about 1 month ago
    Total: 141s
    #481911
  • 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

    We made some changes, including adding an OperationTimeCompressingHandler, to compress the logs, as they can be heavy on large sites.

  • Pipeline finished with Success
    about 1 month ago
    #481943
  • Pipeline finished with Success
    about 1 month ago
    #489989
Production build 0.71.5 2024