Satellite upgrade from 5.6 to 5.7 including OS upgrade failed during database restore

Solution Verified - Updated -

Issue

  • Current Satellite: Satellite 5.6 on RHEL5 with embedded Postgresql database
  • New Satellite: Satellite 5.7 on RHEL6 with embedded Postgresql database
  • Instructions from: /etc/sysconfig/rhn/satellite-upgrade/doc/satellite-and-os-upgrade-postgresql.txt
  • Instructions are acquired from the RPM: rhn-upgrade-5.7.0.26-1.el6sat.noarch
  • Step 5 fails with the error message:

    /var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
    
  • In step 4 the database dump from the RHEL5 Satellite is imported on RHEL6 with:

    # db-control restore /path/to/schema-dump/
    
  • The database is restored in the directory: /opt/rh/postgresql92/root/var/lib/pgsql

  • Some errors were reported:

    droplang: language removal failed: ERROR:  extension "plpgsql" does not exist
    ** Restoring from file /var/satellite/2015-05-16.pgb.
    pg_restore: [archiver (db)] Error while PROCESSING TOC:
    pg_restore: [archiver (db)] Error from TOC entry 3396; 2612 16387 PROCEDURAL LAN
    GUAGE plpgsql postgres
    pg_restore: [archiver (db)] could not execute query: ERROR:  language "plpgsql" 
    already exists
        Command was: CREATE PROCEDURAL LANGUAGE plpgsql;
    
  • In step 5 the Postgresql is started with "service postgresql start", However this starts a version 8 Postgresql which does not have a database initialized.

Environment

  • Red Hat Satellite 5.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.