Restoring backup of Red Hat Satellite server on a target Satellite server fails with an error could not connect to database template1

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.11

Issue

  • Unable to restore a backup of source Red Hat Satellite server on a target Red 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

Workaround

  • Restore the full backup first on the target Red Hat Satellite server then proceed with restoring an incremental backup on the target Red Hat Satellite server. Use --whitelist="restore-reindex-databases" option in the satellite-maintain restore command for every restore on the target Red Hat Satellite server.

    • Below is an example of restoring Full Backup and Incremental 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 reindexdb step that is performed after restoring from a backup.
SBR
Product(s)
Components
Category

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.