Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techgaun/heroku-pgdb-copy
A plain simple bash script to copy and setup heroku database to your local postgres
https://github.com/techgaun/heroku-pgdb-copy
heroku heroku-cli heroku-postgres
Last synced: 22 days ago
JSON representation
A plain simple bash script to copy and setup heroku database to your local postgres
- Host: GitHub
- URL: https://github.com/techgaun/heroku-pgdb-copy
- Owner: techgaun
- License: mit
- Created: 2018-03-10T02:41:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-10T03:33:18.000Z (almost 7 years ago)
- Last Synced: 2024-10-31T12:14:09.177Z (2 months ago)
- Topics: heroku, heroku-cli, heroku-postgres
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heroku-pgdb-copy
> A plain simple bash script to copy and setup heroku database to your local postgres
### Usage
- Install [heroku-cli](https://devcenter.heroku.com/articles/heroku-cli)
- Make sure you are logged in: `heroku login`
- clone this repo or download the script from https://github.com/techgaun/heroku-pgdb-copy/raw/master/heroku-pgdb-copy```shell
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
```shell
$ 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
```