title: Best practices for exporting mongo collections to SQL Server
body: <p>we are using MongoDB (on Linux) as our main database. However, we need to periodically (e.g. nightly) export some of the collections from Mongo to a MS SQL server to run analytics.</p>
  
  <p>I am thinking about the following approach:</p>
  
  <ol>
  <li>Backup the Mongo database (probably from a replica) using mongodump</li>
  <li>Restore the database into a Windows machine where Mongo is istalled</li>
  <li>Write a custom made app to import the collections from Mongo into SQL (possibly handling any required normalization).</li>
  <li>Run analytics on the Windows SQL Server installation.</li>
  </ol>
  
  <p>Are there any other <em>"tried and true"</em> alternatives?</p>
  
  <p>Thanks,
   Stefano </p>
  
  <p><strong>EDIT</strong>: for point 4, the analytics is to be run on SQL Server, not Mongo.</p>