GithubHelp home page GithubHelp logo

lawsontaylor / mongodb-atlas-backup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kysely/mongodb-atlas-backup

0.0 0.0 0.0 2 KB

The human way to mongodump and mongorestore your MongoDB Atlas cluster

License: MIT License

JavaScript 100.00%

mongodb-atlas-backup's Introduction

MongoDB Atlas Backup npm version

The human way to mongodump and mongorestore your MongoDB Atlas cluster

Install

npm install --save mongodb-atlas-backup

Setup & Use

import MongoBackup from 'mongodb-atlas-backup'

// Create an instance of the database connection
const backup = new MongoBackup({
    user: 'userWithMightyAccess',
    password: '<VERY SECRET PASSWORD>',
    replicaSet: 'Cluster0-shard-0',
    nodes: [
        'cluster0-shard-00-00-cbei2.mongodb.net:27017',
        'cluster0-shard-00-01-cbei2.mongodb.net:27017',
        'cluster0-shard-00-02-cbei2.mongodb.net:27017'
    ]
})

// Dump your cluster
backup.dump()

// Restore data to your cluster
backup.restore()

Possible improvements

I made this out of basic needs for one of my projects. Feel free to send pull requests if you came up with some improvement though. These are some of the ideas that could be implemented:

  • add support for dumping/restoring specific database (just need to add a pair of command line arguments)
  • extract connection specs from existing Mongo/ose connection
  • add support for non-Unix OS (aka Windows)

mongodb-atlas-backup's People

Contributors

kysely avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.