Satellite 6.2 : Pruning mongodb database

Satellite 6 uses a MongoDB database to keep track, among other things, which RPMs compose a certain content view, etc. As the Satellite gets used and CVs are created and deleted, it can leave some old data around.

A way to trim that data can be achieved with the MongoDB built-in tools, mongod. Note that you will need as much free space as your database uses at the moment, plus a couple of GB. You can check the MongoDB documentation for more details:

This can help improve content view promotion time among other tasks.

The process would be:

  • Stop Satellite services with katello-service stop .
  • Backup your MongoDB ; a tar would suffice or use katello-backup .
  • Launch the repair: mongod --dbpath {{ mongodb_path }} --repair
  • Start services with katello-service start .

This can reduce MongoDB database size up to 50% and halve publication time :-)

Happy hacking!