<div dir="ltr">This is great to hear, Phil & Charles; from what you both say, i gather that migration to PostGIS will be easy enough, when the time comes for that... And so i can standardize my new installation on GeoPackage without concern that i may regret this later.  Thanks for instructing me about these options!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 11, 2020 at 12:26 PM Philip Barlow <<a href="mailto:philipb@pembrokeshirecoast.org.uk">philipb@pembrokeshirecoast.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB">
<div class="gmail-m_3479142327645249446WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">OGR is a great option, if you wanted a GUI you could also do it with the “export to PostgreSQL” processing tool in batch processing
 mode (right click). Select all the layers and then you can auto fill the fields for primary key, geometry column etc.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Phil<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> Qgis-user <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Charles Dixon-Paver<br>
<b>Sent:</b> 11 August 2020 11:45<br>
<b>To:</b> Walt Ludwick <<a href="mailto:walt@valedalama.net" target="_blank">walt@valedalama.net</a>><br>
<b>Cc:</b> <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [Qgis-user] Migrating legacy QGIS instance<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Easiest way for me is to use the GDAL <a href="https://gdal.org/programs/ogr2ogr.html" target="_blank">
ogr2ogr</a> command using a bash script or cmd batch to traverse your directories (depending on how you installed QGIS this should be on your path). I don't know what environment you're running though.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You can either stick multiple shps into a single gpkg or create one per feature as you prefer. ogr2ogr can also push shp files directly into PostGIS. When you want to consolidate or migrate data (between gpkgs or from gpkg to PostGIS) you
 can simply select the feature layers you want and use drag and drop from the QGIS 3 Browser panel to copy multiple features to a target location.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Others might have different approaches though.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, 11 Aug 2020 at 12:24, Walt Ludwick <<a href="mailto:walt@valedalama.net" target="_blank">walt@valedalama.net</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">I've inherited a legacy GIS, built up over some years in versions 2.x, that i'm now responsible to maintain.  Being an almost complete n00b (did take a short course in QGIS a good few years ago, but still..), i could really use some advice
 about migration.<br>
<br>
i've created a new QGIS instance in version 3.14, into which i am trying to bring all useful content from our old system: oodles of shapefiles, essentially, plus all those other files (each .shp file appears to bring with it a set of.shx, .dbf, .prj, qpj  files,
 plus a .cpg file for each layer, it seems).  This is a significant dataset- 14gb, >1000 files -and that is just base data, not counting Projects built on this data or Layouts used for presenting these projects in various ways. Some of this is cruft that i
 can happily do without, but still:  i've got a lot of porting-over to do, without a clear idea of how best to do it.
<br>
<br>
The one thing i'm clear about is: i want it all in a non-proprietary database (i.e. no more mess of .shp and related files) that is above all quick & easy to navigate & manage. It is a single-user system at this point, but i do aim to open it up to colleagues
 (off-LAN, i.e. via Internet) as soon as i've developed simple apps for them to use.  No idea how long it'll take me to get there, so...<br>
<br>
Big question at this point is: What should be the new storage format for all this data?  Having read a few related opinions on StackOverflow, i get the sense that GeoPackage will probably make for easiest migration (per
<a href="https://medium.com/@GispoFinland/learn-spatial-sql-and-master-geopackage-with-qgis-3-16b1e17f0291" target="_blank">
this encouraging article</a>, it's a simple matter of drag&drop -simple if you have just a few, i guess! [1]), and can easily support my needs in the short term, but then i wonder: How will i manage migration to PostGIS when i eventually put  this system online
 with different users/ roles enabled?<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">[1] Given that i need to pull in some hundreds of .shp files that are stored in a tree of many folders & subfolders, i also wonder: is there a simple way that i can ask QGIS to traverse a certain directory, pull in all the .shp files -each
 as its own .gpkg layer, i suppose?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Any advice about managing this migration would be much appreciated!<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><u></u><u></u></p>
</blockquote>
</div>
</div>

<p align="left">Mae'r Awdurdod yn hapus i gyfathrebu yn Gymraeg neu yn Saesneg</p>
<p align="left">The Authority is happy to communicate in Welsh or English<br></p>
<div>*********************************************************************** 
</div>
<div>Website <a href="http://www.pembrokeshirecoast.wales" target="_blank">www.pembrokeshirecoast.wales</a></div>
<div>Follow us on <a href="http://twitter.com/PembsCoast" target="_blank">Twitter</a> </div>
<div>Join us on <a href="http://www.facebook.com/group.php?gid=26330984774&ref=ts" target="_blank">Facebook</a></div>
<div>Watch us on <a href="http://www.youtube.com/user/pcnpa2008#p/u/0/Tw8Udou0p5k" target="_blank">Youtube 
</a></div>
<div>Look at us on <a href="http://www.flickr.com/photos/pembrokeshirecoast/" target="_blank">Flickr</a></div>
<div> </div>
<div> </div>
<div>This email and any attached files should only be read <font face="Arial">by</font> those persons to whom<br>they are addressed and be used by 
them only for their intended purpose.<br>If you are not the intended recipient 
please destroy all copies and inform the<br>sender by return 
email.<br><br>Please note that the contents of this email may be subject to 
public disclosure <br>under the Freedom of Information Act 2000 and therefore 
the confidentiality of <br>this message and any reply cannot be 
guaranteed.</div>
<div> </div>
<div><a href="https://www.pembrokeshirecoast.wales/privacy/" target="_blank">Click 
here</a> to view PCNPA Privacy Notice – Keeping your Information Safe</div>
<div><br>For further information on the PCNPA please visit our website at <a href="http://www.pembrokeshirecoast.wales" target="_blank">www.pembrokeshirecoast.wales</a></div>
<div><br>Please consider the environment before printing this email.<br><br>Dim 
ond y personau hynny yr anfonwyd yr e-bost hwn atynt ac unrhyw ffeiliau sydd 
<br>ynghlwm ddylid eu darllen, a dim ond hwy ddylid eu defnyddio at y diben y 
bwriadwyd hwy. <br>Os nad y chi yw'r person y bwriadwyd eu derbyn a fyddech 
gystal â dinistrio pob copi a rhoi <br>gwybod i'r anfonwr gyda throad yr 
e-bost.<br><br>Noder os gwelwch yn dda y gall cynnwys yr e-bost hwn orfod cael 
ei ddatgelu i'r cyhoedd o <br>dan Deddf Rhyddid Gwybodaeth 2000 ac felly ni 
ellir gwarantu cyfrinachedd y neges hon <br>nac unrhyw ateb. <br><br><a href="https://www.arfordirpenfro.cymru/preifatrwydd/" target="_blank">Cliciwch yma</a> i weld 
Hysbysiad Preifatrwydd APCAP - Cadw eich Gwybodaeth yn Ddiogel </div>
<div><br>Am ragor o wybodaeth am APCAP ymwelwch â'n gwefan ar <a href="http://www.arfordirpenfro.cymru" target="_blank">www.arfordirpenfro.cymru</a> 
<br><br>Ystyrier yr amgylchedd cyn argraffu'r e-bost hwn os gwelwch yn 
dda.</div>
</div>

</blockquote></div>