💻
notes
  • Initial page
  • sql
    • date-and-time
    • Ordering Columns
    • Replacing Portions of Text
    • count-rows
    • Changing the Case of Strings
    • Create Excerpts with Substring
    • Transactions
    • removing-data
    • Finding Length of Strings
    • add-row-to-a-table
    • limit-and-paginate-results
    • Concatenating Strings
    • SQL JOINs
    • basic-math
    • updating-rows-in-a-table
    • Subqueries
    • Set Operations
    • SQL Basics Cheatsheet
  • ruby
    • gems
      • Auto use Ruby version with gemset
      • Must Have Gems
      • Create Devise user without any validation
    • rails
      • What are the differences between #where and #find?
  • postgresql
    • Export database dump from Heroku and import to local database
  • glossary
  • vim
    • Edit Recorded Macros
    • Sort Multiple Lines
    • Search and Replace
    • Folding
  • iTerm
  • git
    • Git
  • Command Line Utilities
  • How To Use Notes
  • Terminal Cheatsheet for Mac
Powered by GitBook
On this page

Was this helpful?

  1. postgresql

Export database dump from Heroku and import to local database

  • Go the your Heroku dasboard and click to the Resources

  • Under Add-ons, click to your database (yours can be different: `Heroku

    Postgres::Orange`

  • Within the newly opened tab, you should see the Capture Backup. Click it

    and wait couple of seconds for Heroku to create your back-up

  • When the back-up creation is completed, click to the Download button

  • Move the file to the project's directory

  • Rename file to the day you downloaded the database from Heroku: yyyy-mm-dd.dump

  • Open terminal and run the command below after making required the changes:

    • `pg_restore --verbose --clean --no-acl --no-owner -h localhost -U ogirginc

      -d chitter_dev 2017-05-03.dump`:

      • First; change ogirginc to your computer's username,

      • Second; chitter_dev to your application's database,

      • Third; 2017-05-03.dump to the day you downloaded the database from

        Heroku

PreviouspostgresqlNextglossary

Last updated 5 years ago

Was this helpful?