<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Before anything, please backup your database with pg_dumpall, it backups all databases, users, everything.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://www.postgresql.org/docs/11/app-pg-dumpall.html">https://www.postgresql.org/docs/11/app-pg-dumpall.html</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Next I have done this in the past.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">$pg_dump yourdatabase > yourdatabase.sql</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">$createdb yournewdatabase</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">$psql yournewdatabase</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#create extension postgis;</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#create extension postgis_topology;</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#etc, etc,. all your extensions<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#\i /path/to/yourdatabase.sql</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#select postgis_full_version();<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If it asks for an update do as described here.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="http://postgis.net/docs/manual-3.1/postgis_administration.html#soft_upgrade">http://postgis.net/docs/manual-3.1/postgis_administration.html#soft_upgrade</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If everything is OK, drop the old database and rename yournewdatabase with the old name.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If there are conflicts with rpm uninstall postgis 2.5 and then install postgis 3</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">search with rpm -qa | grep postgis</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#yum remove postgisxxx</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(255,0,0)"><b><br></b></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(255,0,0)"><b>Don't forget to backup everything!</b></span><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hope it helps.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Nahum.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun, 24 ene 2022 a la(s) 13:06, Nikhil Shetty (<a href="mailto:nikhil.dba04@gmail.com" target="_blank">nikhil.dba04@gmail.com</a>) escribió:<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 style="background-color:rgba(0,0,0,0);border-color:rgb(255,255,255)"><div dir="auto"><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">Hi Team,</span><div style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">I am looking for a faster way to upgrade postgis on postgresql 11 from 2.5.4 to 3.1.2.</div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">I am getting below error when doing though yum</div><div style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><blockquote class="gmail_quote" style="font-size:1rem;word-spacing:1px;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;border-color:rgb(49,49,49) rgb(49,49,49) rgb(49,49,49) rgb(204,204,204);color:rgb(49,49,49)">Transaction check error:<br> file /usr/pgsql-11/share/extension/address_standardizer.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/address_standardizer.sql from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/address_standardizer_data_us.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/postgis.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/postgis_sfcgal.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/postgis_tiger_geocoder.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/share/extension/postgis_topology.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/bin/pgsql2shp from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/bin/raster2pgsql from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64<br> file /usr/pgsql-11/bin/shp2pgsql from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64</blockquote><div style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">I have seen the document for 'Hard Upgrade' but that is unfortunately a long route to take for a critical database.</div><div style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">Postgresql Version - 11.7</div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">OS - RHEL 7.9</div><div style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto"><br></div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">Full Version Details - </div><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">PostgreSQL 11.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit POSTGIS="2.5.4" [EXTENSION] PGSQL="110" GEOS="3.8.1-CAPI-1.13.3" PROJ="Rel. 7.0.0, March 1st, 2020" GDA</span><span style="word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)">L="GDAL 3.0.4, released 2020/01/28" LIBXML="2.9.1" LIBJSON="0.11" LIBPROTOBUF="1.0.2" RASTER</span></div><div style="background-color:rgba(0,0,0,0);border-color:rgb(255,255,255)" dir="auto"><font style="border-color:rgb(49,49,49);color:rgb(49,49,49)"><span style="word-spacing:1px"><br></span></font></div><div style="background-color:rgba(0,0,0,0);border-color:rgb(255,255,255)" dir="auto"><font style="border-color:rgb(49,49,49);color:rgb(49,49,49)"><span style="word-spacing:1px"><br></span></font><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">Thanks and Regards,</div><div style="font-size:1rem;word-spacing:1px;border-color:rgb(49,49,49);color:rgb(49,49,49)" dir="auto">Nikhil</div></div>
</div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><b>Nahum Castro González</b><br>Blvd. Perdigón 214, Brisas del Lago.<br>
CP 37207<br>
León, Guanajuato, México<br></div><br></div></div>