Created
September 27, 2019 13:48
-
-
Save afmicc/e6acb7811c39bedb2a6f564767771d84 to your computer and use it in GitHub Desktop.
Heroku - Copy database to another app
This file contains 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
# get git remote url names | |
git remote -v | |
# create back up at old app | |
heroku pg:backups:capture --remote origin-remote-name-url | |
heroku pg:backups:download --remote origin-remote-name-url # optional | |
# get backup url | |
heroku pg:backups:url --remote origin-remote-name-url # return s3-amazon-url | |
# restore backup at new app | |
heroku pg:backups:restore '<s3-amazon-url>' DATABASE_URL --remote destination-remote-name-url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment