Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Last active October 6, 2015 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/0edc43560667cf718355 to your computer and use it in GitHub Desktop.
Save kevinhooke/0edc43560667cf718355 to your computer and use it in GitHub Desktop.
Export from MongoDB on OpenShift
#$OPENSHIFT_NOSQL_DB_PORT was changed on OpenShift at some point where NOSQL is now the db type, like MONGODB
#so for MongoDB use $OPENSHIFT_MONGODB_DB_PORT
mongoexport --host $OPENSHIFT_NOSQL_DB_HOST--port $OPENSHIFT_NOSQL_DB_PORT --authenticationDatabase admin --username admin --password yourpassword --db your-app-name --collection your-collection-name --out export-filename.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment