SUSE Support

Here When You Need Us

Database migration fails after the SUMA Server Upgrade from 4.1 to 4.2

This document (000020381) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager Server 4.2

Situation

The database migration  /usr/lib/susemanager/bin/pg-migrate-12-to-13.sh fails with below error message.
 

"Success. You can now start the database server using:

pg_ctl -D /var/lib/pgsql/data -l logfile start

15:03:58 Successfully initialized new postgresql 13 database.
15:03:58 Upgrade database to new version postgresql 13...
Performing Consistency Checks
-----------------------------
Checking cluster versions
Old cluster data and binary directories are from different major versions.
Failure, exiting
15:03:58 Upgrading database to version 13 failed!
15:03:58 Trying to restore previous state...
mv: cannot move '/var/lib/pgsql/data' to '/var/lib/pgsql/data-new-failed/data': File exists"

Resolution

1) Workaround to fix the issue if encountered:

Find the original database within /var/lib/pgsql/data/ for example 
/var/lib/pgsql/data/data-pg12/data-pg12/data-pg12 or 
/var/lib/pgsql/data/data-pg12/data-pg12/ as per the entries created on the Server.
1) mv /var/lib/pgsql/data /var/lib/pgsql/data-backup
2) mv /var/lib/pgsql/data-backup/data-pg12/data-pg12/data-pg12 /var/lib/pgsql/data
3) mv /var/lib/pgsql/data-new-failed /var/lib/pgsql/data-new-failed.2

2)The fix to prevent the issue has been released through susemanager-4.2.21-3.3.1 and few other related packages.

Cause

This error is caused due to the failed database migration where /var/lib/pgsql/data contains data from previous failed migration which needs to be cleaned to fix the issue.

Status

Reported to Engineering

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020381
  • Creation Date: 07-Sep-2021
  • Modified Date:28-Oct-2021
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.