code: function createBackup(mongoUri, collections, type, opts) {
    //TODO make assertions on parameters
    if (!(collections instanceof Array))
      collections = [collections];
  
    var handler = getHandler(type);
  
    var successfulBackups = [];
    var backupCollections = R.map(function (collection) {
      var stream = mds.slurp.binary(mongoUri, collection);
      return handler.store(stream, opts)
        .then(function (handlerReceipt) {
          successfulBackups.push(handlerReceipt); //Yuck
          return {
            collection: collection,
            data: handlerReceipt
          };
        });
    });
  
    var backups = backupCollections(collections);
  
    return q.all(backups)
      .then(function (receipts) {
        return {
          type: type,
          receipts: receipts
        };
      })
      .then(null, function (err) {
        q.allSettled(backups)
          .then(function () {
            successfulBackups.forEach(function (r) { //Rollback changes (figure out a more intelligent way of doing this)
              handlers[type].destroy(r);
            });
          });
        throw err; //FIXME
      });
  }
docs: A backup record is of the following form { id: <type> type: <collectionName> receipts: <handlerReceipt> }  A receipt is of the following form { collection: 'The name of the collection associated with the receipt' data: 'The handler payload (i.e the actual receipt)' } collection associated with the receipt and the receipt payload itself in the data attribute key.