Skip to content

How to restore your local DB with a dump file

Fionna Chan edited this page Oct 19, 2020 · 1 revision
  1. Download the dump file. It's probably a gzip file.
  2. Unzip the file.
  3. Make sure that you have an empty database, i.e. run mvn liquibase:clearCheckSums liquibase:dropAll at pathmind-database. Remeber to drop all tables and the trigger functions.
  4. Make sure that you have created a user role called pathmind for the database. For example, you can run CREATE ROLE pathmind SUPERUSER LOGIN PASSWORD 'something'; on psql.
  5. Run pg_restore -U pathmind -d pathmind dev.sql on the terminal. Fionna's experience was to explicitly state the location of the dev.sql, i.e. pg_restore -U pathmind -d pathmind C:/downloads/dev.sql

Clone this wiki locally