Last active
April 3, 2025 18:31
-
-
Save davidleandro/d6b4f2961dd344d16484 to your computer and use it in GitHub Desktop.
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
dropdb DATABASE | |
rails db:create | |
heroku pg:backups:capture --app APPNAME | |
rm -rf latest.dump | |
heroku pg:backups:download --app APPNAME | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d DATABASE latest.dump | |
rails db:migrate | |
/usr/lib/postgresql/16/bin/pg_dump `heroku config:get DATABASE_URL -a APPNAME` -F p > latest.sql | |
psql -h localhost -U davidleandro -d DATABASE < latest.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THANK YOU