Change database location/version for the backup tool "db-control backup" on satellite 5.8

Solution Verified - Updated -

Environment

  • Red Hat satellite 5.8
  • postgresql92

Issue

  • After upgrading from 5.7 to 5.8 , satellite is still working on postgresql92.
  • When trying to run "db-control backup" , it points to the location of postgresql95 /var/opt/rh/rh-postgresql95/lib/pgsql/data/

Resolution

  • Change the current working database on satellite 5.8 by changing pg_data_dir_format on file /usr/share/rhn/config-defaults/rhn_dobby.conf from :
pg_data_dir_format = /var/opt/rh/rh-postgresql95/lib/pgsql/data/

to

pg_data_dir_format = /opt/rh/postgresql92/root/var/lib/pgsql/data/
  • Run backup again.
# db-control backup [Backup Location]

Root Cause

  • After upgrade satellite to 5.8 , the active database is postgresql92 but backup tool "db-control backup" points to postgresql95 as the default database version for satellite 5.8.
  • Database migration from postgresql92 to postgresql95 failed during the satellite upgrade from 5.7 to 5.8.

Diagnostic Steps

  • Run backup tool
# db-control backup [Backup Location]
Initiating cold backup of database rhnsat...
opendir /var/opt/rh/rh-postgresql95/lib/pgsql/data/: No such file or directory

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments