Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1564435 - Postgres fail while restoring
Postgres fail while restoring
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Docs Server Administration Guide (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: Unused
Assigned To: Sergei Petrosian
Melanie Corr
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-06 05:41 EDT by Stephen Wadeley
Modified: 2018-05-14 11:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-05-14 11:52:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Wadeley 2018-04-06 05:41:03 EDT
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 05:56:21 EDT
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 06:30:25 EDT
Hello

I raised:
 Bug 1576748 - [RFE] Support restore onto a new Satellite Server
Comment 11 Stephen Wadeley 2018-05-10 07:00:24 EDT
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 00:17:48 EDT
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 02:47:06 EDT
(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

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