Using the Postgres/pgAdmin Apps
1. Install Postgres App.
2. Download the most recent version of pgAdmin 4. Open the pgadmin4-[version number].dmg file to download the application.
3. Open the Postgres App. Open up a window in terminal.
4. Search for "postgres" or "psql."
5. Make owner "nbuild" as a superuser:
CREATE ROLE nbuild WITH SUPERUSER LOGIN;
6. Create a new database "nbuild" with owner "nbuild" with the following command:
CREATE DATABASE nbuild OWNER nbuild;
7. Connect to the "nbuild" database:
8. Paste the following command, replace "SLUG" with the slug of the nation the snapshot is from.
CREATE SCHEMA nbuild_SLUG; CREATE SCHEMA shared_extensions; CREATE EXTENSION hstore WITH schema shared_extensions; CREATE EXTENSION dblink WITH schema shared_extensions; CREATE EXTENSION citext WITH schema shared_extensions; CREATE EXTENSION pg_trgm WITH schema shared_extensions;
9. Open pgAdmin.
10. Right-click on Servers and select Create.
11. Under General, set the Name as 'localhost.'
12. Under Connection, set the Host name/address as 'localhost,' the Port as '5432', the Maintenance database as 'postgres' and the Username as 'nbuild'
13. Under Servers > nbuild > Databases > nbuild > Schemas, find your schema. Right click and select Restore.
14. Click on the three dots in the Filename field to search for your file. Make sure the filename format is set to All Files.
15. Select your file and click Restore.
Now you should be good to go!