Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

s3-mongo-backup

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3-mongo-backup

Backup and Upload MongoDB Databases to S3

  • 1.3.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

s3-mongo-backup

This Module Helps in automating mongodb database Backups and uploading them to AWS S3.

Features

  • Supports Promises
  • Uploads Backups to S3
  • ZIPs Backups before Uploading them

Usage

Import

const MBackup = require('s3-mongo-backup');

Create a configuration Object

var backupConfig = {
   mongodb: {
   host: "localhost", //Database host
   name: "" //Database name
   // Optional Values 
   username: "", //Username to use to connect to database
   password: "" //Password to use to connect to database
},
s3: {
   accessKey: "public-key", //AccessKey
   secretKey: "private-key", //SecretKey
   region: "us-west-2", //S3 Bucket Region
   accessPerm: "private", //S3 Bucket Privacy, Private is HIGHLY Recommended
   bucketName: "awesome-bucket" //Bucket Name
},
keepLocalBackups: false, //If true, It will not delete local copy of backup
timezoneOffset: 300 //Timezone, It is assumed to be in hours if less than 16 and in minutes otherwise
}

Call the Function and provide Configuration Object to it.

MBackup(backupConfig)
  .then(
    onResolve => {
    // When everything was successful
      console.log(onResolve);
}
    onReject => {
    // When Anything goes wrong!
      console.log(onReject);
});

See examples directory for more examples

License

MIT

NOTE

Please note that, This module uses mongodump to create backup of database, You need to have it installed on the machine on which you are using this module.

Keywords

FAQs

Package last updated on 08 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc