Book Image

Learning Heroku Postgres

By : Patrick Rafael de Oliveira Espake
Book Image

Learning Heroku Postgres

By: Patrick Rafael de Oliveira Espake

Overview of this book

Table of Contents (17 chapters)
Learning Heroku Postgres
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Keyword List
Index

Importing in Heroku Postgres


To import the dump of your database to Heroku, the first step is to upload the file somewhere accessible via an HTTP URL; after that, you can restore the backup through the pgbackups:restore command:

$ heroku pgbackups:restore DATABASE_URL 'http://your-server.com/mydb.dump' --app your-app-name

Tip

You have to add the dump file on your website and include the URL in the preceding command. It is highly recommended to remove the dump file generated after the backup restore.