@tonillo/m-mongo
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

m-mongo

CircleCI

MongoDB migration command line tools for dump restore export and import databases

Requirements

You should have rsync installed on you machine

# on windows with chocolatey
choco install rsync

Also the binary of mongodump and mongorestore must be present in your path.

Then if you need to access MongoDb into a Remote Machine, make sure you have set up an SSH key on the server.

Introduction

Bored to dump, restore or copy collections between different environments?

m-mongo is here to help with these frequent operations.

Let's start by installing it:

npm i -g @tonillo/m-mongo
# or with yarn
yarn global install @tonillo/m-mongo

Now open a terminal or prompt and type m-mongo.

start m-mongo

We can set up an optional folder where dumps are stored, otherwise by default the dump files will be stored in the current folder.

set default storage path

We can now add a cluster.

add a cluster

All the information that you are inserting, are stored in a json file under ~/.config/configstore/m-mongo.json.

Now we can make a dump.

make a dump

Finally we can restore the dump.

restore a dump

Debug

export DEBUG='*'

Other Informations

This project is created with typescript-starter.

I was inspired by this Sitepoint project, with this usefult Sitepoint article

Readme

Keywords

none

Package Sidebar

Install

npm i @tonillo/m-mongo

Weekly Downloads

0

Version

1.0.10

License

MIT

Unpacked Size

469 kB

Total Files

87

Last publish

Collaborators

  • tonillo