Keep all of execution history forever

I have the following settings, the idea is to keep all of execution history forever. I just want everything saved, even if its years worth of data.

EXECUTIONS_DATA_PRUNE=false
EXECUTIONS_DATA_PRUNE_MAX_COUNT=99999999999999999999
DB_SQLITE_VACUUM_ON_STARTUP=“true”

Is this the correct setup to achieve that ?

About 500 executions randomly vanished from database today, nothing in logs.

Information on your n8n setup

  • **n8n version:latest
  • **Database (default: SQLite):sqlite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:debian latest
1 Like

Hey @support337,

In theory just turning off DATA_PRUNE and setting EXECUTIONS_DATA_PRUNE_MAX_COUNT to 0 would do the job but if you are using SQLite I would strongly recommend against doing this.

Instead what I would probably do is move to postgres instead and assuming you have a good database maintenance plan in place you should be all good for a while but forever is a long time so who knows what would happen in the future. Don’t forget the database size can also lead to longer upgrade times.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.