Created
March 17, 2024 07:37
-
-
Save a2ikm/8796eed52882833e01698898ecbcd95d to your computer and use it in GitHub Desktop.
How to run psqldef --export against your heroku PostgreSQL
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
# on your local machine | |
heroku run bash | |
# on one-off dyno | |
wget -O - https://github.com/sqldef/sqldef/releases/latest/download/psqldef_linux_amd64.tar.gz | tar xvz | |
./psqldef --user ${USERNAME_FROM_DATABASE_URL} --password-prompt --host ${HOSTNAME_FROM_DATABASE_URL} --export ${DATABASE_NAME_FROM_DATABASE_URL} | |
Enter Password:${PASSWORD_FROM_DATABASE_URL} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment