This file contains hidden or 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
| # Using the `--exlude-table-data` argument for the `heroku pg:pull` command doesn't seem to be working. | |
| # Instead we're going to copy the Heroku PG database by using the Postgres `pg_dump` and `pg_restore` commands. | |
| # Get the "Connection info string" for myapp | |
| heroku pg:credentials:url DATABASE_URL -a myapp | |
| # Download the database, excluding the `visits` and `ahoy_events` table data. | |
| pg_dump "<PASTE_CONNECTION_INFO_STRING_HERE>" --exclude-table-data visits --exclude-table-data ahoy_events -O -x -Fc -f without_vists_and_ahoy_events.out -v | |
| # In myapp, setup an empty database |
OlderNewer