code: function restoreBackup(backupRecord, mongoUri) {
    var receipts = backupRecord.receipts;
    var handler = getHandler(backupRecord.type);
  
    var restorePromises = receipts.map(function (receipt) {
      var tmpfile = util.getTempFileName() + '.bson';
      return R.pPipe(
        handler.restore.bind(handler),
        R.curry(R.flip(mds.dump.fs.file))(tmpfile),
        R.curryN(4, mongoRestoreFromFile)(tmpfile, mongoUri, receipt.collection)
      )(receipt.data);
    });
  
    return q.all(restorePromises).thenResolve('done');
  }
docs: Consumes a backupRecord produced by createBackup and a mongoUri and restores the information contained in the record to the database described the mongoUri.