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.
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.
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"
Find the original database within /var/lib/pgsql/data/ for example
/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.
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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com