title: How to connect a 2.6 mongo shell to a 2.4.9 mongod?
body: <p><strong>Environment</strong></p>
  
  <ul>
  <li><code>Linux Mint 17.1</code>  </li>
  <li><code>localhost</code></li>
  <li>Default MongoDB port <code>27017</code></li>
  <li>No username or password needed to connect from script.  </li>
  </ul>
  
  <p><strong>Background</strong></p>
  
  <p>I installed <code>MongoDB</code> with:</p>
  
  <pre><code>apt-get install mongodb-10gen=2.4.9
  </code></pre>
  
  <p>I then 'pinned' the package so that no updates would be applied to it:</p>
  
  <pre><code>echo "mongodb-10gen hold" | sudo dpkg --set-selections
  </code></pre>
  
  <p><strong>Desired Behaviou</strong>r</p>
  
  <p>I want to upgrade to the latest version of MongoDB and am looking at the official guide for this process:</p>
  
  <p><a href="http://docs.mongodb.org/manual/release-notes/2.6-upgrade" rel="nofollow">http://docs.mongodb.org/manual/release-notes/2.6-upgrade</a></p>
  
  <p>Early on it states:</p>
  
  <blockquote>
    <p>To begin the upgrade procedure, connect a 2.6 mongo shell to your MongoDB 2.4 mongos or mongod and run the db.upgradeCheckAllDBs() to check your data set for compatibility. </p>
  </blockquote>
  
  <p><strong>Question</strong></p>
  
  <p>How do I <code>connect a 2.6 mongo shell</code> to a <code>2.4.9 mongod</code>?</p>
  
  <p>I would guess that I somehow need to just install the <code>2.6 mongo shell</code> and run it but:</p>
  
  <ul>
  <li>I don't know how to do that and </li>
  <li>I don't want to break anything.  </li>
  </ul>
  
  <p>I've done a <code>mongodump</code> of all database so have a backup.  </p>