> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/web-interface/administration/database-retention-policies.md).

# Database retention policies

The ***Database retention policies*** functionality allows the archiving of the logs available in the database that are older than the selected period. It can also delete these archived logs based on the selected time limit in the parameters.

<table><thead><tr><th width="324">Options</th><th>Descriptions</th></tr></thead><tbody><tr><td><strong>Enable automatic cleanup</strong></td><td>Enable the automatic cleanup logs feature to automatically archive and delete logs.</td></tr><tr><td><strong>Run every day at</strong></td><td>Set the time when the feature will run.</td></tr><tr><td><strong>Use archiving</strong></td><td>If enable, the job will archive and delete logs based on the period selected in the two drop down lists.</td></tr><tr><td><strong>Archive logs older than</strong></td><td><p>Will archive logs that are older than the selected value in the drop down list.</p><ul><li>Custom</li><li>One month</li><li>Three months</li><li>Six months</li><li>One year</li></ul></td></tr><tr><td><strong>Delete archived logs older than</strong></td><td><p>Will delete all archived logs that are older than the selected value in the drop down list.</p><ul><li>Three months</li><li>Six months</li><li>One year</li><li>Two years</li></ul></td></tr><tr><td><strong>Skip archiving and permanently delete</strong></td><td>If enable, will not archive the logs and will permanently delete them.</td></tr><tr><td><strong>Delete logs older than</strong></td><td><p>Will permanently delete all logs older than the selected value in the drop down list.</p><ul><li>Custom</li><li>One month</li><li>Three months</li><li>Six months</li><li>One year</li><li>Two years</li></ul></td></tr><tr><td><strong>Advanced</strong></td><td><a href="https://docs.devolutions.net/server/web-interface/administration/logs/cleanup-logs/advanced-cleanup-logs-configuration/">Advanced</a> configuration is for setting up the archiving and deleting operation on each type of logs.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/server/web-interface/administration/database-retention-policies.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
