Upgrading

This section describes how to upgrade from a previous major version of OpenGeo Suite.

If performing a minor upgrade, you may proceed with a typical install.

Note

A “major” version upgrade is from version 3.x to 4.y. A “minor” version upgrade is from 4.x to 4.y.

Warning

This upgrade is not-backward compatible. Irreversible changes are made to the data so that they can’t be used with versions 3.x and below of OpenGeo Suite.

Back up PostGIS databases

The first step of the upgrade process is to back up your existing PostGIS data.

  1. Ensure the old (3.x) version of OpenGeo Suite is running.

  2. Open up a terminal and Make sure that the PostgreSQL bin directory is on your path. By default, this is located at /opt/opengeo/pgsql/9.1/bin. Use the command psql --version to verify:

    export PATH=$PATH:/opt/opengeo/pgsql/9.1/bin
    psql --version
    
  3. To backup, a specialized PostGIS upgrade utility is used. Download this utility, and extract the archive to a temporary directory. To avoid permissions issues, it is best to put this directory on your desktop or in your home directory. By default, the backup files created from using this script will be saved into this directory.

    mkdir -p opengeo_backup/pg_backup; cd opengeo_backup/pg_backup
    curl -O http://repo.opengeo.org/suite/releases/pgupgrade/postgis_upgrade-4.0.zip
    unzip postgis_upgrade-4.0.zip
    
  4. Run the backup command:

    perl postgis_upgrade.pl backup --port 5432
    

    Note

    For more information about supported options run perl postgis_upgrade.pl --help.

  5. The script will run and create a number of files:

    • Compressed dump files for every database backed up (<database>.dmp)
    • SQL output of server roles
  6. The PostGIS data backup process is complete. You may now shut down OpenGeo Suite 3.x.

Install new Suite

You may now install the new version of OpenGeo Suite. See New installation for details. In order to run the PostGIS restore script you must install the OpenGeo Client Tools package.

Restore PostGIS databases

  1. Ensure PostGIS.app is running.

  2. Ensure the PostGIS/PostgreSQL command line tools are on the PATH. If you did not install the OpenGeo Client Tools` package in the previous section do so now. From a command prompt, type the command:

    export PATH=/usr/local/opengeo/bin:$PATH
    
  3. Restore your PostGIS data by running the upgrade utility again with the “restore” argument:

    cd opengeo_backup/pg_backup
    perl postgis_upgrade.pl restore
    
  4. Your databases and roles will be restored. You can verify that the databases were created and data restored by running psql -l on the command line.

Restore GeoServer data directory

  1. Quit GeoServer.app.

  2. Restore the GeoServer data directory:

    cd ~/Library/Application\ Support/GeoServer
    mv data_dir data_dir.old
    cp -R ~/Library/Containers/com.boundlessgeo.geoserver/Data/Library/Application\ Support/GeoServer .
    
  3. Restart GeoServer.app.

Uninstall old version

You may now uninstall the previous version of OpenGeo Suite. The uninstaller is located at /Applications/OpenGeo/OpenGeo Suite Uninstaller.app.