title: Best way to migrate huge sqlite databases in Etherpad Lite
body: <p>I run Etherpad Lite since two years with sqlite. Now I will migrate the database to MySQL or Redis. I used the <code>bin/migrateDirtyDBtoMySQL.js</code> as inspiration to write my own little migration script. Here it is:</p>
  
  <pre><code>require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
  
      process.chdir(npm.root+'/..');
  
      var settings = require("ep_etherpad-lite/node/utils/Settings");
      var sqlite3 = require('sqlite3');
      var sqliteDb = new sqlite3.Database('var/sqlite.db');
      var db = require("ep_etherpad-lite/node/db/DB");
  
      db.init(function() {
          db = db.db;
  
          sqliteDb.each("SELECT * FROM store", function(err, row) {
              db.set(row.key,row.value);
          });
      });
  
  }); 
  </code></pre>
  
  <p>After sqlite3 dependency is installed it works <strong>but</strong> my sqlite.db file is over 700 MB and the call:</p>
  
  <pre><code>node migrateSqliteDBtoEtherpad.js
  </code></pre>
  
  <p>terminated with kill signal. How can i handle such huge databases with nodejs and etherpad-lite?</p>