Just to make the data import complete, it is worth mentioning the restore command. After all, it is not very an uncommon scenario to receive some data in the form of a database, schema, or even a single table backup.
For this scenario, let's create a backup of one of the tables imported before:
pg_restore: connecting to database for restore pg_restore: creating TABLE "data_import.earthquakes_subset_with_geom" pg_restore: processing data for table "data_import.earthquakes_subset_with_geom" pg_restore: setting owner and privileges for TABLE "data_import.earthquakes_subset_with_geom" pg_restore: setting owner and privileges for TABLE DATA "data_import.earthquakes_subset_with_geom"
At this stage, we have successfully imported data by using the PostgreSQL backup / restore facilities.
If you happen to get some errors on the pg_dump version, do make sure you're using the one appropriate for the DB you are exporting from. You can find it in the bin folder of the PostgreSQL directory.