title: How to backup all databases on SQL Server 2008
body: <p>I have been working on SQL Server 2008 R2 for 4 years and it's time to format my laptop.</p>
  
  <p>I just use the default instance, which I can access using the <code>.</code> as server name, and then my username and password for user authentication.</p>
  
  <p>Now I want to format my laptop, and it is almost impossible to backup manually all the database.</p>
  
  <p>I found in the following path </p>
  
  <blockquote>
    <p>C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL</p>
  </blockquote>
  
  <p>all the databases that I have, for each database I found:</p>
  
  <ol>
  <li>databasename_log.ldf</li>
  <li>databasename.mdf</li>
  </ol>
  
  <p>I copied these files to an external hard drive.</p>
  
  <h3>My question:</h3>
  
  <p>Are those files enough to import the database after formatting? Will they work if I installed (after formatting) SQL Server 2012 not 2008 R2?</p>