Copying config values for a new heroku app

Some options on copying config values for a new heroku app


One Liner

Source

heroku config -s -a source-heroku-app | grep -vE '^DATABASE_URL|^HEROKU_' | xargs heroku config:set --app target-heroku-app

Using a temp file

source

1. Export existing app’s variables to config.txt

heroku config -s -a existing-heroku-app > config.txt

2. Review and push to another app

cat config.txt | tr ‘\n’ ’ ’ | xargs heroku config:set -a new-heroku-app