title: loading records from mnesia dump is not writing to disk
body: <p>Before I got started on this project I determined that my DB had been corrupted such that all new records were being inserted as ram_copies instead of disc_copies.</p>
  
  <p>So I took a backup:</p>
  
  <p><code>mnesia:dump_to_textfile("fixerupper99.txt").</code></p>
  
  <p>I went through the text file and added the disc_copies atribute to the table list section of the text file.</p>
  
  <p>At this point I stopped my app and all of the extra nodes. I also deleted all of the files in the mnesia dir.</p>
  
  <p><code>rm DECISION_TAB.LOG LATEST.LOG schema.DAT *.DC[DL]</code></p>
  
  <p>It generated a nice file that had everything in it. Schema and records. After experimenting I realized that it was missing the <code>create table</code> attributes for persisting to disk <code>{disc_copies, [metagate@KS0002]}</code>.</p>
  
  <p>The steps I followed:</p>
  
  <ul>
  <li>mnesia:stop().</li>
  <li>mnesia:create_schema([nodes()]).</li>
  <li>mnesia:start().</li>
  <li>mnesia:info().</li>
  </ul>
  
  <p>At this point everything looked ok., but empty. Next I began loading in the data from the dump-file. <code>mnesia:load_textfile("fixerupper99.txt").</code></p>
  
  <p>I immediately checked the info <code>mnesia:info().</code> and everything was as I expected. I then exited <code>erl</code> and went to look at the folder where I was storing the mnesia data. All of the files that I expected to have disc_copies existed in the folder but all of the files were practically empty.</p>
  
  <p>Well, no matter what I do it seems that the files/tables are still being considered as ram_copies and so they are not being written to disk.</p>
  
  <p>I tried <code>change_table_copy_type()</code> but that did not work correctly.</p>
  
  <p>Mnesia:info says that my files are on disk but a restart of the application causes all of the data to disappear. ideas?</p>