PostGIS – Import Entire Geopackage via DB Manager

dbmanagergeopackagepostgispostgresqlqgis

I am trying to important an entire geopackage to a PostGIS database via the Import Layer/File button in DB Manager. However when I do this only one of the layers in the geopackage gets successfully imported. Do I have to import each layer individually or there a way I can import the entire geopackage at once? It would be ideal if I could do this in DB Manager as QGIS is the software I am most familiar with.

Best Answer

The import option in the DB Manager is made to work for one layer at a time. I would do the job with ogr2ogr. If the GPKG layers are not listed in the command, or defined by the -sql option, then all layers are converted.

ogr2ogr -f PostgreSQL PG:"<connection parameters>" input.gpkg
Related Question