Restoring backup of Red Hat Satellite server on a target Satellite server fails with an error could not connect to database template1
Environment
- Red Hat Satellite 6.11
Issue
-
Unable to restore a backup of source
Red Hat Satelliteserver on a targetRed Hat Satellite server. The backup-restore task fails with below error:Failed executing runuser - postgres -c "reindexdb -a", exit status 1: reindexdb: error: could not connect to database template1: FATAL: could not open file "base/1/XXXXX": No such file or directory
Resolution
-
This issue has been reported via This content is not included.Bugzilla 2230934 and is fixed in the errata RHSA-2023:6818 for Red Hat Satellite 6.14.z.
-
This content is not included.Upgrade the Red Hat Satellite server to version 6.14.z to fix the reported issue.
Workaround
-
Restore the full backup first on the target
Red Hat Satelliteserver then proceed with restoring an incremental backup on the targetRed Hat Satelliteserver. Use--whitelist="restore-reindex-databases"option in thesatellite-maintain restorecommand for every restore on the targetRed Hat Satelliteserver.-
Below is an example of restoring
Full BackupandIncremental Backup.Full backup: /backup/satellite-backup-2023-11-16-16-03-49 Incremental backup: /backup/satellite-backup-2023-11-16-16-18-24 # satellite-maintain restore --whitelist="restore-reindex-databases" /backup/satellite-backup-2023-11-16-16-03-49 # satellite-maintain restore --whitelist="restore-reindex-databases" /backup/satellite-backup-2023-11-16-16-18-24
-
-
For more information, open a This content is not included.support case with
Red Hat Technical Support Team.
For more KB articles/solutions related to Red Hat Satellite 6.x backup issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x backup-related Issues
Root Cause
- The issue is caused by the
reindexdbstep that is performed after restoring from a backup.
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.