Bug 2171797 - Restoring Satellite snapshot backup untar the postgresql in /var/snap instead of /var/lib/pgsql
Summary: Restoring Satellite snapshot backup untar the postgresql in /var/snap instead...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.12.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Evgeni Golov
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-20 12:35 UTC by Jayant Bhatia
Modified: 2023-08-03 17:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-16040 0 None None None 2023-02-20 14:07:48 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.