This repository consists of scripts which can help migrating data from your couchdb databases to mongodb collections
These are the dependency libraries/packages which has been used for the scripts which has been used for migration scripts :
Library/Package Name | Description | Web Reference |
---|---|---|
Node.js 6.x | Node.js framework is necessary to run node scripts | install/download |
Couchbackup | Npm package to install | install |
MongoDB 3.4 | Mongodb where restore will happen :p | install |
As these scripts are shell scripts you will need to export variables to your linux shells, you may want to save these in your profile rc file as well :
export COUCH_URL="https://username:password@hostname:port"
export COUCH_BUFFER_SIZE=10000
export LC_ALL=C
As per resolution of issue, IBM Cloudant databases can be migrated easily to mognoDB as well. All the cloudant users can use below COUCH_URL
env variable :
export COUCH_URL="https://MY_USERNAME:MY_PASSWORD@[email protected]:port"
Finally all you need is database name of couchdb, mongodb database name & credentials. Run following script with following command :
master_script.sh collection_name mongo_db_name mongo_username mongo_password mongo_host mongo_port
For users, who are having mongodb open (I mean without user authentication), they can use another script and hit this command :
./master_script_without_pwd.sh collection_name mongo_db_name mongo_host mongo_port
Happy Coding! -@jimishio