syslib
October 28, 2016, 8:26am
1
Hello
I would like to know how to free up space in mongo db.
We use the log browser, and we delete the registers manually using the command:
db.tyk_analytics.remove({})
but this is not changing the mongo database size:
show dbs ----> tyk_analytics 5.951GB
The api policies use the month as the time unit.
Is it possible to delete old data after one month?
Thanks!
James
October 31, 2016, 12:45pm
2
The simplest thing to do is to turn the tyk_analytics collection into a capped collection.
How you do that, will depend on your mongo setup, but they have guides that should help:
syslib
November 7, 2016, 7:35am
3
Hi
Thanks for your reply I will use it.
Do I need to turn into capped other collections like?
tyk_analytics_aggregates
tyk_analytics_users
Thanks
Martin
November 7, 2016, 9:05am
4
tyk_analytics will be the collection that grows fastest, sonwpuld start there.