alphagov/backdrop — pull request #242 by roc (2014-02-17 15:29:33+00:00)
Title: Set realtime collection capped size to 4mb/2 weeks + tolerance

![](https://24.media.tumblr.com/f5bd417c1992f61fe47a1eb7253fa940/tumblr_mz79hoekCn1torpako1_500.jpg 'Hey look, it's a Samoyed in a cap - get it?')

- Removes the capped_size reference from all buckets that are not realtime
- Finds all realtime collections
- Creates capped copies of these collections, capped at 4mb
- Copies in all records to new capped collection, preserving most recent records
- Removes uncapped backup collection
- Updates bucket metadata to reflect new 4mb cap