Adds rake tasks to perform backup and restore between heroku remotes
Recommended git remotes setup pattern:
$ git remote -v
origin [email protected]:rubynor/somecoolproject.git (fetch)
origin [email protected]:rubynor/somecoolproject.git (push)
production [email protected]:somecoolproject.git (fetch)
production [email protected]:somecoolproject.git (push)
staging [email protected]:somecoolproject-stage.git (fetch)
staging [email protected]:somecoolproject-stage.git (push)
gem 'heroku-db-sync'
#backup production and overwrite local development (postgresql) db
rake db:sync:heroku:local
#backup production and overwrite staging db
rake db:sync:heroku:staging
#NOTE: heroku will prompt you to confirm the name of the before overwriting it! Remember to type it
you may also specify remotes
rake db:sync:heroku:remote[staging,production]
#where to_remote=staging and from_remote=production
rake db:sync:heroku:local[staging]
#where from_remote=staging
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This project rocks and uses MIT-LICENSE.