Delete Audit Log Entries

The ability to configure an automatic archival and deletion of audit records in the database is available in FileCloud Server version 11.0 and later.

Admin Audit Log Deletion

Beginning with version 19.3, admins can now prohibit other admins from deleting audit logs.


If you need to you can remove entries from the log file manually or configure an automatic archival and deletion of log entries.

It is important to keep in mind that removing log entries from the Admin dashboard also removes them from the database. However, MongoDB does not release the space but keeps it for new entries to be added in the future. 

Some reports, such as reports on file actions and failed logins, get their data from the audit log. These reports only include events that are in the audit logs when you run the report. See Custom Reports for information about specific reports


If you need to reclaim the space, you should compact the database.


How do you want to remove Audit log entries?

Manually Trim the Audit Database 


To manually remove audit log entries:

  1. Open a browser and log in to the Admin Portal.
  2. From the left navigation panel, click Audit.
  3. On the Audit Logs window, click Manage.
  4. In Start Date, select a date or type in a date in the following format: YYYY-MM-DD. If you do not specify a start date, the deletion will occur for the very first log entry until specified End Date.
  5. In End Date, select a date or type in a date in the following format: YYYY-MM-DD.
  6. Click Delete.
  7. On the Confirm dialog box, click OK.p

To ensure that audit database does not grow too large for its allotted disk space, audit records should be archived and removed regularly. 

(warning) Before you enable Automatic Archiving, you must ensure that Cron job or Task Scheduler is installed and running.

When you are deciding whether or not to automatically archive and remove audit records (or how often to archive and remove them), please note that some reports use the audit log and can only show events if they are still contained in the audit log. 

As part of the daily cron job (scheduled task), you can configure FileCloud to export records to a .csv file and delete those records from the audit database.  

This is configured in the Settings screen on the Admin tab. 

To auto archive audit log entries:

  1. Open a browser and log in to the Admin Portal.
  2. From the left navigation panel, click Settings.
  3. Click the Admin tab.
  4. Scroll down to Audit Settings.
  5. Fill in all of the settings as indicated in the following table:
SettingDescription
Audit Logging Level

Options are

  • OFF - No Audit Log Recorded.
  • REQUEST - Log all requests and results of request but not the full response.
  • FULL - Log complete request and response.
Auto Archive Audit DatabaseCheck the check box to enable auto archive. NOTE: Cron Job must be set up and running.
Auto Archive Audit Records after (in days)Number of days to store the audit records in the database. After the number of days specified, audit records are exported to csv and deleted from the audit database
Storage Path for Archived Audit RecordsFolder path to store the exported audit records in CSV format. For example, C:\archives

If you want to automatically remove records but not archive them, you can configure FileCloud to remove audit records but not export them to a csv file.

To auto remove records without exporting them:

  1. Open cloudconfig.php:
    Windows Location: XAMPP DIRECTORY/htdocs/config/cloudconfig.php
    Linux Location: /var/www/config/cloudconfig.php
  2. Add the following :
    Define("TONIDOCLOUD_AUDIT_AUTO_ARCHIVE_OMIT_BACKUP", true);

To disable manual deletion by administrators.:

  1. Open cloudconfig.php:
    Windows Location: XAMPP DIRECTORY/htdocs/config/cloudconfig.php
    Linux Location: /var/www/config/cloudconfig.php
  2. Add the line:
    define("TONIDOCLOUD_DISALLOW_ADMIN_AUDIT_DELETE", true);

  3. Save and close cloudconfig.php.
    Now, in the Admin Portal when you click Audit in the navigation pane, and then click Manage, the Delete button is no longer available on the Manage Audit Logs dialog box.