Description of problem: An online backup produces pg_globals.dump. A user can still run katello-restore without this file, even though katello-restore expects it to be there. Version-Release number of selected component (if applicable): 6.3.0 How reproducible: %100 Steps to Reproduce: 1.katello-backup --online-backup /backup 2.change name of pg_globals.dump in backup 3.run katello-restore on backup Actual results: Katello-restore script executes Expected results: A warning message that pg_globals is missing/modified and script exits. Additional info:
Created redmine issue http://projects.theforeman.org/issues/20632 from this bug
Upstream bug assigned to jomitsch
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20632 has been resolved.
[root@rhel7 ~]# katello-restore /tmp/backup/katello-backup-20170906161439/ WARNING: This script will drop and restore your database. Your existing installation will be replaced with the backup database. Once this operation is complete there is no going back. Are you sure(Y/N)? y Starting restore from /tmp/backup/katello-backup-20170906161439/: 2017-09-06 16:19:12 +0000 Setting file security Done. Resetting Katello yes | foreman-installer -v --reset --scenario katello Failed 'yes | foreman-installer -v --reset --scenario katello'
This is blocked being verified by https://bugzilla.redhat.com/show_bug.cgi?id=1488590 Once that is resolved, we can verify this.
Verified on sat 6.3 snap 24: Using backup with renamed pg_globals: ~]# katello-restore /backup/satellite-backup-20171110092110 DEPRECATION WARNING: katello-restore is deprecated and will be removed in the next Satellite release. It is being replaced by satellite-restore. Redirecting to satellite-restore now. ---- The given directory does not contain the required files or has too many files ---- All backup directories contain: config_files.tar.gz, pulp_data.tar* ---- An online backup directory contains: mongo_dump, candlepin.dump, foreman.dump, pg_globals.dump ---- An offline backup directory contains: mongo_data.tar.gz, pgsql_data.tar.gz ---- A logical backup directory contains: mongo_dump, candlepin.dump, foreman.dump, pg_globals.dump, mongo_data.tar.gz, pgsql_data.tar.gz ---- *pulp_data.tar is optional ---- Please choose a valid backup directory Usage: satellite-restore /path/to/dir [options] eg: $ satellite-restore /tmp/backup/satellite-backup-20171002150106 -y, --assumeyes Answer yes for all questions
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336