Last active
December 2, 2019 15:02
-
-
Save t-book/14bc849ad9567ca28a24c122d52ff77d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET thumbnail_url = replace(thumbnail_url, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET ows_url = replace(ows_url, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET layer_params = replace(layer_params, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET source_params = replace(source_params, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_mapsnapshot SET config = replace(config, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET supplemental_information = replace(supplemental_information, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET csw_anytext = replace(csw_anytext, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE django_site SET domain = replace(domain, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE layers_style SET sld_url = replace(sld_url, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET metadata_xml = replace(metadata_xml, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_link SET url = replace(url, '$1', '$2')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@fra_fra nice, thanks. To dump the data and just use sed worked for me as well in several instances.