Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2000971

Summary: Offline backups are not restored on a Satellite with the external DB
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, aupadhye, gtalreja, kgaikwad, zhunting
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.18 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 13:48:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladimír Sedmík 2021-09-03 12:49:12 UTC
Description of problem:
Offline backups are not restored on a Satellite with the external DB.


Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.8.13-2.el7sat.noarch
satellite 6.10.0 snap 16


How reproducible:
always


Steps to Reproduce:
1. Have a SAT with external DB
2. Take an offline backup
3. Try to restore the backup


Actual results:
Restore fails on validation check although all files seem to be present:
[root@satellite ~]# ls /home/backups/bkp-old/ofl-pulp/satellite-backup-2021-09-02-14-42-01/
candlepin.dump  config_files.tar.gz  foreman.dump  metadata.yml  pgsql_data.tar.gz  pulp_data.tar
[root@satellite ~]#
[root@satellite ~]# foreman-maintain restore /home/backups/bkp-old/ofl-pulp/satellite-backup-2021-09-02-14-42-01/
...
--------------------------------------------------------------------------------
Validate backup has appropriate files:                                [FAIL]

The given directory does not contain the required files or has too many files

All backup directories contain: config_files.tar.gz
An online or remote database backup directory contains: candlepin.dump, foreman.dump, foreman.dump
An offline backup directory contains: pgsql_data.tar.gz
A logical backup directory contains: candlepin.dump, foreman.dump, foreman.dump, pgsql_data.tar.gz
Including pulp_data.tar is optional and will restore pulp data to the filesystem if included.

Only the following files were found: pgsql_data.tar.gz, pulp_data.tar, foreman.dump, candlepin.dump, config_files.tar.gz, metadata.yml

--------------------------------------------------------------------------------


Expected results:
Successful restore

Comment 1 Brad Buckingham 2021-09-09 13:54:20 UTC
Is this a regression from Satellite 6.9?

Comment 2 Vladimír Sedmík 2021-09-13 07:49:33 UTC
I can see the same issue on 6.9.6 (using the in-snap rubygem-foreman_maintain-0.7.13-1) too.

Comment 3 Amit Upadhye 2021-09-27 13:04:33 UTC
*** Bug 2007735 has been marked as a duplicate of this bug. ***

Comment 4 Amit Upadhye 2021-09-27 13:11:28 UTC
Hello,

The foreman-maintain was never capable of restoring the backups which are taken in situation where some of the dbs are external. On 6.9 the pulpcore db is getting installed locally due to lack of documentation changes or maybe lack of understanding about pulpcore db is still there though its not being used,

https://bugzilla.redhat.com/show_bug.cgi?id=1999791

Because of this foreman-maintain exposed to the use case which was never handled though we support this kind of partial db setup: https://access.redhat.com/articles/3586701
_
Amit Upadhye.

Comment 5 Vladimír Sedmík 2021-10-08 13:39:22 UTC
Verified at 6.10.0 snap 21 with rubygem-foreman_maintain-0.8.18-1.el7sat.noarch - successfully restored the offline backup

Comment 8 errata-xmlrpc 2021-11-16 13:48:21 UTC
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 (Satellite 6.10 Satellite Maintenance Release), 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/RHBA-2021:4697