[フレーム]
Last Updated: February 25, 2016
·
1.321K
· raulraja

Transfer a Mongolab Heroku DB to your local MongoDB

Add this to your ~/.bash_profile

function heroku_mongolab_transfer {

 URI=`heroku config --app 1ドル | grep "MONGOLAB_URI:" | sed 's/MONGOLAB_URI://g'`
 mongoctl dump $URI
 mongoctl restore mongodb://localhost dump/

}

Then use like this...

herokumongolabtransfer appname

It assumes you have mongoctl and the heroku toolbelt installed in your system.

https://github.com/mongolab/mongoctl

https://toolbelt.heroku.com/

AltStyle によって変換されたページ (->オリジナル) /