Bug 1564435

Summary: Postgres fail while restoring
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: Docs Server Administration GuideAssignee: Sergei Petrosian <spetrosi>
Status: CLOSED CURRENTRELEASE QA Contact: Melanie Corr <mcorr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: adprice, cdonnell, spetrosi, swadeley
Target Milestone: Unspecified   
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: 2018-05-14 15:52:24 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 Stephen Wadeley 2018-04-06 09:41:03 UTC
Document URL: 

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-backup_and_disaster_recovery#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Backup_and_Disaster_Recovery-Restoring_Satellite_Server_or_Capsule_Server_from_a_Backup

Section Number and Name: 

Chapter 7. Backing Up and Restoring Satellite Server and Capsule Server

Describe the issue: 

Failed 'runuser - postgres -c 'psql -f ./pg_globals.dump postgres 2>/dev/null'' with exit code 1

Suggestions for improvement: 

Running 'runuser -postgres -c pwd' returns '/var/lib/pgsql'. The solution is to copy *.dump to /var/lib/pgsql before running satellite-restore.

Additional information: 

https://access.redhat.com/discussions/3401451

Comment 9 Stephen Wadeley 2018-05-10 09:56:21 UTC
Hello

Performing a restore on another Satellite Server is not a currently supported procedure. The docs say[1]

"This process is intended for restoring the backup on the same server that generated the backup, and all data covered by the backup is deleted on the target system. If the original system is unavailable, provision a system with the same configuration settings (in particular, the host name must be the same). "

"provision a system" means a new RHEL7 server. 

We can use this bug to make that clear, and raise another bug as RFE to support the case on comment 0.

Lets change docs:

s/a system with the same configuration settings (in particular, the host name must be the same)/a Red Hat Enterprise Linux server with the same host name settings. Do not install Satellite Server/


(In reply to Stephen Wadeley from comment #0)

> 
> Running 'runuser -postgres -c pwd' returns '/var/lib/pgsql'. The solution is
> to copy *.dump to /var/lib/pgsql before running satellite-restore.
> 

A suggested alternative that should work:

  specify full path to the backup, being in a place where the postgres user has permissions

Safer would be to use the 'satellite-clone' procedure[2] or install and use a new RHEL7 server.


[1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-backup_and_disaster_recovery#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Backup_and_Disaster_Recovery-Restoring_Satellite_Server_or_Capsule_Server_from_a_Backup

[2] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html/upgrading_and_updating_red_hat_satellite/upgrading_red_hat_satellite#migrating_satellite_server

Comment 10 Stephen Wadeley 2018-05-10 10:30:25 UTC
Hello

I raised:
 Bug 1576748 - [RFE] Support restore onto a new Satellite Server

Comment 11 Stephen Wadeley 2018-05-10 11:00:24 UTC
Hello Craig

Please confirm I understood you correctly, that if you do not have the original Satellite Server available you must restore onto a plain RHEL 7 Server and not first install Satellite Server.


Thank you

Comment 12 Craig Donnelly 2018-05-11 04:17:48 UTC
Stephen,

I think that was more a situational comment from me - where in this case the customer should have utilized satellite-clone rather than building out a Satellite from a backup.

If you do choose to restore a full backup to another system, you would need to first install Satellite and follow the path that is already laid out in the docs today.

Comment 13 Stephen Wadeley 2018-05-11 06:47:06 UTC
(In reply to Craig Donnelly from comment #12)
> Stephen,
> 
> I think that was more a situational comment from me - where in this case the
> customer should have utilized satellite-clone rather than building out a
> Satellite from a backup.
> 
> If you do choose to restore a full backup to another system, you would need
> to first install Satellite and follow the path that is already laid out in
> the docs today.

OK, thank you.

I think the docs could be more explicate.

So how about we change docs:

s/provision a system with the same configuration settings (in particular, the host name must be the same)/provision a Red Hat Enterprise Linux server with the same configuration and host name settings, followed by installation of Satellite Server or Capsule Server as required./

Thank you