> 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

Set up Database Retention Policies in Devolutions Server to automatically archive and delete logs after configurable time periods, or purge them permanently.

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="/server/web-interface/administration/database-retention-policies.md">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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
