Skip to content

A plain simple bash script to copy and setup heroku database to your local postgres

License

Notifications You must be signed in to change notification settings

techgaun/heroku-pgdb-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

heroku-pgdb-copy

A plain simple bash script to copy and setup heroku database to your local postgres

Usage

wget -O heroku-pgdb-copy https://github.com/techgaun/heroku-pgdb-copy/raw/master/heroku-pgdb-copy && chmod +x heroku-pgdb-copy
  • Pass HEROKU_APP and DATABASE_NAME as the variables. These are the required variables.
  • Optionally pass DB_USER and PGPASSWORD (defaults assumed by this script are postgres : postgres)
  • If you have multiple pg database or non-standard database url, you can pass HEROKU_DB_URL

Examples

$ HEROKU_APP=zego-stage DATABASE_NAME=zego-stage ./heroku-pgdb-copy

# custom database url
$ HEROKU_APP=zego-stage DATABASE_NAME=zego-stage HEROKU_DB_URL=HEROKU_POSTGRESQL_MAUVE_URL ./heroku-pgdb-copy

# custom pg user and password locally
$ HEROKU_APP=zego-stage DATABASE_NAME=zego-stage DB_USER=techgaun PGPASSWORD=hello123 ./heroku-pgdb-copy

About

A plain simple bash script to copy and setup heroku database to your local postgres

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages