Skip to content

v1.3.24: feat: Introduce command to move logs to external audit storage

Choose a tag to compare

@thorewi thorewi released this 20 Sep 06:01
· 97 commits to main since this release
This feature adds a `fancyadmin:move-logs` command to safely transfer log records from the operational database to a dedicated, separate storage.

Key motivations and features:
*   **Audit Trail Integrity:** Ensures log immutability by storing audit data independently from the application, preventing unauthorized modification.
*   **Long-Term Retention:** Offloads growing log tables from the main database, improving performance while allowing logs to be kept for extended periods.
*   **Data Safety:** Employs a robust write-to-target-then-delete-from-source transaction model, guaranteeing no data loss even if the process is interrupted.
*   **Traceability:** Preserves original record IDs and ensures correct UTC time handling in the target database, maintaining links between related log entries.
*   **Configurable:** Allows specifying entities and target tables through the `logMover` configuration, supporting batching, limits, and dry runs.
*   **Resilience:** Individual table failures do not halt the moving process for other configured tables.