🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

mongo-backup-to-s3

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-backup-to-s3

stream mongodb backups to S3, with ease

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

Mongo Backup to S3

Easily stream mongodb backups to S3

NPM Version

Motivation

Explore an inexpensive way to backup your MongoDb databases

Get Started

Setup an S3 bucket, run this in a cron job using a Heroku Single Dyno (worker)

Install

npm install mongo-backup-to-s3

Example:

var mongoBackup = require('mongo-backup-to-s3');

var config = {
    mongodb:{
        url: process.env.MONGO_URL
    },
    s3:{
        bucket:'mybucket',
        folder:'backups',
        key: process.env.AWS_ACCESS_KEY,
        secret: process.env.AWS_SECRET_KEY
    }
};

mongoBackup.dumpToS3(config);

Generated filename in S3: backups/mongo_2015-12-30_22-16-34_mydatabase.dmp

Dependent modules

This module relies heavily on mongo-dump-stream so it can output the 'dump' to a stream, and so we don't have to use mongodump (which requires a child process).

Keywords

mongodb

FAQs

Package last updated on 07 Jan 2016

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