💾 mongo-clone
CLI tool for cloning mongoDB database from one server to another.
It is useful for DB backups from DB hostings that doesn't support free backup plan. (e.g. mlab)
🔧 Installation
From npm (the recommended way):
npm i mongo-clone -g
or
From git repo:
- clone repo:
git clone https://github.com/fr1sk/mongo-clone.git
- cd to repo:
cd mongo-clone
- install mongo-clone:
npm i -g
👨🏻💻 Usage
Start cloning:
mongo-clone -s <SOURCE_MONGO_DB_URL> -t <TARGET_MONGO_DB_URL> [-f]
-s
source mongoDB server that you want to clone from
-t
target mongoDB server (empty DB) that you want to clone to
-f
(optional) force deletion of target mongoDB before copying
Mongo URL example:
mongodb://USER:PASS@HOST:PORT/DBNAME
🔎 Other info - Good to know
- It won't clone all of system.indexes!
🗂️ - Keep in mind that this is beta version and if you have some problems please report it! My email is
fr1sk@live.com
📧 - Feel free to contribute - just open PR! 👋🏻
- If you like it buy me a beer
🍺
My BTC addresse:1KUxHZT6H9aSHQrNZvb1qw6ZvRJ6VEApWu
👨🏻🔧👩🏻🔧 Collaborators
📺 Demo
mongo-clone: without arguments!
mongo-clone: cloning in progress!
mongo-clone: cloning completed!