v8-archive
v8-archive copied to clipboard
Add revision storing limit
Hi everyone,
I encountered a serious issue lately and I was adviced in Slack to open a feature request here. The table directus_revisions ended up 17GB in size. So, it would be nice if we have a setting where we can choose the number of days or the last X changes on an item that we want to keep on the database. Otherwise, we risk that this table will become enormous.
Thank you
Definitely! I've seen this quite a bit on client servers, and would love to have a "prune" option.
We can achieve this in 2 ways.
- In every request, API will delete the revisions which was created before the number of days mentioned in the setting.
- Create a standalone API for this.
I'll prefer to go with the first one.
@directus/api - Let me know your thoughts.
I don't know what you mean by option 2, but I think we should definitely have a auto-delete feature that is based on a given setting.
Should it be number of revisions instead of number of days? You can have a million updates in a day, but also have 5 revisions over 6 years.
I think we should have a setting that controls how many revisions to save, instead of how long to save them 🙂
I agree — but think we should have both for exactly that reason. You should be able to set a total number of revisions before pruning, or a time to prune (defined in days?). Also, are we including activity in this... or just revisions? Lastly, should there be a way to manually/individually "lock" or "save" an important revision so it doesn't get deleted?
DELETE /directus_activities/ID DELETE /directus_revisions/ID
As well as global option KEEP_MAXIMUM_ACTIVITIES/REVISIONS
Would both be great!
Any news on this? I already have 6 GB of revisions in 10 days. Is possible to disable revisions for certain users?
No news. You can write a custom script to prune this, upvote this issue in hopes that it gets done sooner, or find someone to sponsor its development.
The v9 directus_activity
and directus_revisions
tables are growing in size without any means of limiting their growth. I'd also love to see some sort of configuration setting that controls how long entries are kept around either by age or by count so that the tables don't end up bloating the entire db.
I upvote this it's getting rediculous, i noticed performance issues recently:
-
directus_revisions
was nearly 6 million records & 8 GB in size - In tandem,
directus_activity
is also nearly 6 million records (much smaller in size around 600mb)
We need a way to manage this efficiently TBH...