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 2171797

Summary: Restoring Satellite snapshot backup untar the postgresql in /var/snap instead of /var/lib/pgsql
Product: Red Hat Satellite Reporter: Jayant Bhatia <jbhatia>
Component: Satellite MaintainAssignee: Evgeni Golov <egolov>
Status: CLOSED DUPLICATE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.12.1CC: egolov, ehelms, gsulliva
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-10-24 15:56:05 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 Jayant Bhatia 2023-02-20 12:35:09 UTC
Description of problem:

While restoring the snapshot backup, the postgresql database untar in '/var/snap' and it fails if '/var/snap' does not have enough disk space. The postgresql database should untar files within '/var/lib/pgsql' which should definitely have the required free disk space.

Also the filenames in the PostgreSQL backup are missing a / which leads to error during restore.

# tar -tvvf pgsql_data.tar.gz  | head -n 10
-rw------- postgres/postgres 3 2023-xx-xx xx:xx var/snap/pgsql/dataPG_VERSION
drwx------ postgres/postgres 0 2023-xx-xx xx:xx var/snap/pgsql/database/
drwx------ postgres/postgres 0 2023-xx-xx xx:xx var/snap/pgsql/database/1/

There should be a / after data in first row like: 'var/snap/pgsql/data/PG_VERSION'


Version-Release number of selected component (if applicable): Satellite-6.12.1


How reproducible: Always


Steps to Reproduce:

1. Take the Satellite snapshot backup using command "# foreman-maintain backup snapshot -y /var/lib/backup".

2. Now restore the snapshot backup on another machine.

   # foreman-maintain restore -y /var/lib/backup/satellite-backup-2023-xx-xx-xx-xx-xx


Actual results: The "var/snap/pgsql/dataPG_VERSION" is missing a / after data in the pgsql backup. Also the pgsql backup untars in '/var/snap' instead of '/var/lib/pgsql' while restoring the backup


Expected results: The file in backup should include / like 'var/snap/pgsql/data/PG_VERSION'. The pgsql backup should untar in '/var/lib/pgsql' while restoring the backup.

Comment 1 Eric Helms 2023-10-24 15:56:05 UTC

*** This bug has been marked as a duplicate of bug 2212996 ***