Created
July 21, 2012 03:43
-
-
Save wuputah/3154505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./clone-db COLOR from-app to-app plan | |
# | |
# example: | |
# ./clone-db COBALT my-production-app my-staging-app crane | |
# | |
# The COLOR is used for a grep on your config var output, so make sure it's unique. | |
color=$1 | |
src=$2 | |
dest=$3 | |
plan=$4 | |
heroku addons:add heroku-postgresql:$plan --fork "$(heroku config --shell -a $src | grep $color | cut -d = -f 2)" -a $dest |
Recent version of the Heroku toolbelt required. Latest is 2.29.0 - check heroku version
, run heroku update
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🍰