---
title: 'Database Maintenance'
url: 'https://docs.danami.com/warden/settings/panel-application/database-maintenance'
markdown: 'https://docs.danami.com/warden/settings/panel-application/database-maintenance.md'
date: '2026-10-11'
description: 'Database Maintenance When running the optimize or delete commands on a busy server it is recommended to do this off hours as the tables will be locked while the OPTIMIZE table or DELETE commands are being performed. The log maintenance area allows admins to perform maintenance on informat…'
taxonomy:
  category:
    - docs
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ Settings ](https://docs.danami.com/warden/settings)     [ Panel Application ](https://docs.danami.com/warden/settings/panel-application)      Database Maintenance    

# Database Maintenance

## Database Maintenance

> > > > > When running the optimize or delete commands on a busy server it is recommended to do this off hours as the tables will be locked while the OPTIMIZE table or DELETE commands are being performed.

The log maintenance area allows admins to perform maintenance on information stored in the Warden database. Admins can select the log type that they want to perform maintenance on then press the button with the action they want to perform.

## Maintenance Settings

**Delete action logs after** - `prune_action_logs`
A nightly task to prune action logs older than this number of days.
Default: 90

**Delete application logs after** - `prune_application_logs`
A nightly task to prune application debug logs older than this number of days.
Default: 90

**Delete email logs after** - `prune_email_logs`
A nightly task to prune email logs older than this number of days.
Default: 90

**Delete message logs after** - `prune_message_logs`
A nightly task to prune message logs older than this number of days.
Default: 45

**Delete quarantine data after** - `prune_quarantine`
A nightly task to prune quarantined data older than this number of days.
Default: 30

**Delete spam folder messages after** - `prune_spam_folders`
A nightly task to prune messages that have been moved to a mailbox's spam folder older than this number of days.
Default: 30

**Delete statistics after** - `prune_statistics`
A nightly task to prune statistics older than this number of days.
Default: 365

**Delete rule statistics after** - `prune_rule_statistics`
A nightly task to prune rule statistics older than this number of days.
Default: 365

 [ ](https://docs.danami.com/warden/settings/panel-application/network-tools-settings) [](https://docs.danami.com/warden/settings/panel-application/settings-management)

---

## Navigation

- Parent: [Panel-application](https://docs.danami.com/warden/settings/panel-application.md)
- Previous: [Network Tools Settings](https://docs.danami.com/warden/settings/panel-application/network-tools-settings.md)
- Next: [Settings Management](https://docs.danami.com/warden/settings/panel-application/settings-management.md)
