mongo-s3

Dump mongo collections, zip, upload to S3

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mongo-s3
1241.2.07 years ago8 years agoMinified + gzip package size for mongo-s3 in KB

Readme

mongoS3
Simply dump a Mongo DB, then stream everything to AWS S3, promise flavoured

Usage

const mongoS3 = require('mongo-s3');

mongoS3({
  log: console.log,
  uri: process.env.MONGO_URI,
  s3: {
      accessKeyId: process.env.AWS_ACCESS_KEY_ID,
      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
      bucket: process.env.AWS_S3_DUMP_BUCKET,
      key: process.env.AWS_S3_DUMP_KEY
  }
}).then(function (result) { console.log('EVERYTHING SHOULD BE OK') })
  .catch(function (err) { console.error('Snap, something went wrong :(') });