<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>FranGarcia.me (Posts about mongodb)</title><link>https://www.frangarcia.me/</link><description></description><atom:link href="https://www.frangarcia.me/categories/mongodb.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Mon, 06 Jun 2022 06:29:14 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Satellite 6.2 : Pruning mongodb database</title><link>https://www.frangarcia.me/posts/satellite-62-pruning-mongodb-database/</link><dc:creator>Fran Garcia</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.mongodb.com/v2.6/faq/storage/#how-do-i-reclaim-disk-space"&gt;https://docs.mongodb.com/v2.6/faq/storage/#how-do-i-reclaim-disk-space&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This can help improve content view promotion time among other tasks. &lt;/p&gt;
&lt;p&gt;The process would be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stop Satellite services with &lt;code&gt;katello-service stop&lt;/code&gt; .&lt;/li&gt;
&lt;li&gt;Backup your MongoDB ; a tar would suffice or use &lt;code&gt;katello-backup&lt;/code&gt; .&lt;/li&gt;
&lt;li&gt;Launch the repair:
  &lt;code&gt;mongod --dbpath {{ mongodb_path }} --repair&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Start services with &lt;code&gt;katello-service start&lt;/code&gt; . &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This can reduce MongoDB database size up to 50% and halve publication time :-)&lt;/p&gt;
&lt;p&gt;Happy hacking!&lt;/p&gt;</description><category>mongodb</category><category>satellite6</category><category>tips</category><guid>https://www.frangarcia.me/posts/satellite-62-pruning-mongodb-database/</guid><pubDate>Sat, 29 Jul 2017 16:22:20 GMT</pubDate></item></channel></rss>