title: Backup complete postgis database with geometry transformation
body: <p>I have a PostGIS enabled PostgreSQL database that is no longer needed in production. I would like to back it up, but the geometry columns of PostGIS should be transformed to a simple, long-term stable text format like WKT.</p>
  
  <p>I'm aware of the <a href="https://postgis.net/docs/using_postgis_dbmanagement.html#idm2192" rel="nofollow noreferrer"><code>ST_AsText</code></a> function.</p>
  
  <pre><code>SELECT road_id, ST_AsText(road_geom) AS geom, road_name FROM roads;
  </code></pre>
  
  <p>But how do I apply this to backup the complete database with several tables with geometries and many without?</p>