Bug 1564435 - Postgres fail while restoring
Summary: Postgres fail while restoring
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Docs Server Administration Guide
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Sergei Petrosian
QA Contact: Melanie Corr
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-06 09:41 UTC by Stephen Wadeley
Modified: 2019-09-26 14:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-14 15:52:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


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