mongodump --db=<old_db_name> --collection=<collection_name> --out=data_directory/
tar -zcvf archive.tar.gz data_directory/
mongorestore --db=<new_db_name> --collection=<collection_name> data/<db_name>/<collection_name>.bson
Created
March 28, 2017 15:13
-
-
Save Nyahua/f33e7b4d461be83b70bf8b0f0c307854 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment