/mongoS3

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

Primary LanguageJavaScriptMIT LicenseMIT

mongo-backup-s3

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

Installation

Install with npm:

npm install mongo-backup-s3

Usage

const mongoS3 = require('mongo-backup-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 :(') });