Compact the Audit Database

Although deleting entries from the audit logs on the Audit screen removes the entries from the database, MongoDB doesn't free up that space.

  • MongoDB retains the space to use for new entries that will be added in the future. 

If for some reason, you need to reclaim the space, you can compact or repair the database.

To compact a MongoDB database:

  1. Open MongoDB client command interface, which is typically located in:

  2. Run the following command in the MongoDB client.

    > use tonidoauditdb;
    > db.runCommand({ compact: 'audit' });
    > show dbs;
    > exit;

Now the unused space is available on your server.