Skip to content

Import a db dump

Sajjad Anwar edited this page May 7, 2018 · 1 revision
  1. Use docker to bring up the database
  2. Download a latest dump from S3.
  3. Extract it to a folder
  4. Copy the following script to a file import.sql. Use the correct folder paths.
BEGIN;

\copy users FROM './make-full-backup.tmp/users.copy';
\copy changesets FROM './make-full-backup.tmp/changesets.copy';
\copy current_nodes FROM './make-full-backup.tmp/current_nodes.copy';
\copy current_ways FROM './make-full-backup.tmp/current_ways.copy';
\copy current_way_nodes FROM './make-full-backup.tmp/current_way_nodes.copy';
\copy current_way_tags FROM './make-full-backup.tmp/current_way_tags.copy';
\copy road_properties FROM './make-full-backup.tmp/road_properties.copy';
\copy field_data_geometries FROM './make-full-backup.tmp/field_data_geometries.copy';
\copy point_properties FROM './make-full-backup.tmp/point_properties.copy';
\copy tasks FROM './make-full-backup.tmp/tasks.copy';

COMMIT;
  1. Run psql postgres://postgres:postgres@localhost:5433/openroads -f ./import.sql

Clone this wiki locally