Bug 1380905

Summary: katello-restore: Perform required files check before starting the restore
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Backup & RestoreAssignee: Christine Fouant <cfouant>
Status: CLOSED ERRATA QA Contact: John Mitsch <jomitsch>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: bbuckingham, greartes, jcallaha, jomitsch
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/16825
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:44:00 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:

Description sthirugn@redhat.com 2016-10-01 11:11:43 UTC
Description of problem:
katello-restore: Perform required files check before starting the restore

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

How reproducible:
Always

Steps to Reproduce:
1. Get data export from an other satellite.  I had the following files in /restore folder
01678184-01678184-config_files.tar.gz
01678184-01678184-elastic_data.tar.gz
01678184-01678184-mongo_data.tar.gz
01678184-01678184-pgsql_data.tar.gz
2. run katello-restore:
#katello-restore /restore
...
...
Restoring backend data
tar (child): elastic_data.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar: pulp_data.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar (child): mongo_data.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar (child): pgsql_data.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Done.
...
...


Actual results:
katello-restore failed since the tar file names aren't what the system expected

Expected results:
katello-restore should check for the tar file names before starting the restore process.

Additional info:

Comment 2 Christine Fouant 2016-10-06 18:12:20 UTC
Created redmine issue http://projects.theforeman.org/issues/16825 from this bug

Comment 3 Bryan Kearney 2016-10-06 20:03:43 UTC
Upstream bug component is Content Management

Comment 4 Bryan Kearney 2016-10-12 20:03:22 UTC
Upstream bug component is Backup & Restore

Comment 5 Bryan Kearney 2016-10-13 18:03:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16825 has been resolved.

Comment 6 John Mitsch 2017-08-16 15:15:47 UTC
satellite-6.3.0-16.0.beta.el7sat.noarch (snap 10)

I changed the filename of each of the individual files in a katello-backup. Each time I tried to run katello-restore on the modified backup, I was not able to restore the backup and was given a warning. When the filenames were correct, I was able to run a backup.

The one exception to this is the pg_globals.dump file in an online backup. When I change this to something like 01_pg_globals.dump, I can still run a backup. I'm going to mark this as failed QA, but if a separate issue would be a better bet for this, I can open one up.

I also ran into some more issues that I will open up:

- I can't run katello-restore as it uses --scenario katello in the installer, which doesn't exist in Satellite. This is the output: Failed 'yes | foreman-installer -v --reset --scenario katello'

- If config_files.tar.gz is missing, the error message mentions config_file.tar.gz (signular, not plural)

Comment 7 John Mitsch 2017-08-16 15:30:19 UTC
Since this is a pretty small issue, I'm marking this Verified and opening up a new bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1482164

Comment 8 John Mitsch 2017-08-16 15:37:00 UTC
Opened up the following bugs as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1482168
https://bugzilla.redhat.com/show_bug.cgi?id=1482166

Comment 9 Bryan Kearney 2018-02-21 16:41:08 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, 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

Comment 10 Bryan Kearney 2018-02-21 16:44:00 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, 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

Comment 11 Satellite Program 2018-02-21 16:51:07 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, 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