Dump a Mongolab Heroku DB
Add this to your ~/.bash_profile
function heroku_mongolab_dump {
URI=`heroku config --app $1 | grep "MONGOLAB_URI:" | sed 's/MONGOLAB_URI://g'`
mongoctl dump $URI
}
Then use like this...
herokumongolabdump app_name
It assumes you have mongoctl and the heroku toolbelt installed in your system.
Written by Raúl Raja
Related protips
1 Response
Sadly this fails with the following error from mongodump: Failed: error counting herokuapp7946173.system.users: not authorized on herokuapp7946173 to execute command { count: "system.users", query: {} }
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Heroku
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#