I'm exploring solutions for a basic dbadmin need :
periodically backing up and purging data in MongoDB.
Basically, I need a logrotate for mongodb.
I have a backend program filling a collection. I deliberately didn't implement a backup and purge feature in my application because I was thinking that It's a dbadmin concern. This collection is growing, at the rythm of 2 docs per 3 seconds.
I'd like to periodically archive old documents and delete them from my collection. The period, the expiredate, the place where and patterns how to archive would be configurable, just like logrotate does.
So far I found TTL to delete it and mongodump to backup it, but I don't know if I'm looking at the right direction.
Edit: I'd be curious to get the answer for the same question concerning MySql
Re-edit: voluntarily duplicated here because can't decide where is the best, and both sysadmin and dbadmin opinion matters to me. Feel free to mark it if you think it's bad