Chapter 17. Back up and restore Red Hat Update Infrastructure
This chapter explains the procedure of backing up and restoring your Red Hat Update Infrastructure. See Pulp Backups and MongoDB Backup Methods for more information on backing up Pulp and MongoDB.
17.1. Back up the Red Hat Update Appliance
Follow these steps to back up the Red Hat Update Appliance server. Stopping services does not disable any client instances from updating or installing packages because clients are only connected to the content delivery servers (CDSs), not to the Red Hat Update Appliance server. If you have an automated monitoring solution in place, your monitoring may fail during the backup process.
Procedure
-
The
/var/lib/pulp
directory may be large, depending on how many repositories have been deployed on the Red Hat Update Appliance. See Preparing your Environment for Installation for specific storage requirements, or use thedu
command from the command line interface to determine its size. Stop the pulp-server services.
# systemctl stop pulp_workers; systemctl stop pulp_resource_manager; systemctl stop pulp_celerybeat
-
Replace
stop
withstatus
in the above commands to verify each service has stopped. It is important that the following files retain their current attributes when backed up:
-
/etc/httpd/conf.d/05-pulp-https.conf
-
/etc/httpd/conf.d/pulp*
-
/etc/httpd/conf.d/ssl.conf
-
/etc/pki/katello-certs-tools/*
-
/etc/pki/pulp/*
-
/etc/pki/rhui/*
-
/etc/pulp/*
-
/etc/puppet/*
-
/etc/rhui/*
-
/etc/rhui/rhui-tools.conf
-
/etc/rhui-installer/*
-
/etc/qpid/qpidd.conf
-
/var/lib/mongodb/pulp_database*
-
/var/lib/pulp/*
-
/var/log/pulp/*
-
/var/log/httpd/*
/var/lib/puppet/*
Use the following command to back up the files:
# cp -a source_files_path destination_files_path
-
- You may want to back up any generated client entitlement certificates and client configuration RPMs.
Restart the pulp-server services.
# systemctl start pulp_workers; systemctl start pulp_resource_manager; systemctl start pulp_celerybeat
-
Replace
start
withstatus
in the above commands to verify each service has started.
17.2. Restore the Red Hat Update Appliance
Procedure
- Prepare a new Red Hat Update Appliance instance by following Section 4.2, “Register Red Hat Update Infrastructure” and Section 4.3, “Attach a subscription to the Red Hat Update Appliance”. When those steps are completed, proceed with the following restoration steps.
Stop the pulp-server services.
# systemctl stop pulp_workers; systemctl stop pulp_resource_manager; systemctl stop pulp_celerybeat
Replace
stop
withstatus
in the above commands to verify each service has stopped.ImportantIt is crucial that the files included in the restore retain their current attributes.
Use the following command to restore the files to their original locations:
# cp -a source_files_path destination_files_path
Restart the
pulp-server
services.# systemctl start pulp_workers; systemctl start pulp_resource_manager; systemctl start pulp_celerybeat
-
Replace
start
withstatus
in the above commands to verify each service has started.
17.3. Back up a content delivery server
Follow these steps to back up a CDS. To mitigate the outage, if you have more than one CDS, only back up a single CDS at a time. Client instances will automatically fail over to other running CDS instances.
Procedure
-
The
/var/lib/pulp
directory may be large, depending on how many repositories have been deployed on the Red Hat Update Appliance. See Preparing your Environment for Installation for specific storage requirements, or use thedu
command from the command line interface to determine its size. Stop the
httpd
service.# systemctl stop httpd
-
Replace
stop
withstatus
in the above commands to verify each service has stopped. It is important that the following files retain their current attributes when backed up:
-
/etc/httpd/conf.d/*.conf
-
/var/lib/pulp/*
-
/var/log/pulp/*
-
/var/log/httpd/*
-
/etc/pki/rhui/*
-
/etc/pulp/*
/var/lib/puppet/*
Use the following command to back up the files:
# cp -a source_files_path destination_files_path
-
- In addition to the above files, you may want to back up any generated client entitlement certificates and client configuration RPMs.
Restart the service.
# systemctl start httpd
-
Replace
start
withstatus
in the above commands to verify each service has started.
17.4. Restore a content delivery server
Procedure
- Prepare a new CDS instance by following all steps in Section 7.1, “Add a content delivery server”. When those steps are completed, proceed with the following restoration steps.
Stop the
httpd
service.# systemctl stop httpd
Replace
stop
withstatus
in the above commands to verify each service has stopped.ImportantIt is crucial that the files included in the restore retain their current attributes.
Use the following command to restore the files to their original locations:
# cp -a source_files_path destination_files_path
Restart the
httpd
service.# systemctl start httpd
-
Replace
start
withstatus
in the above commands to verify each service has started.
17.5. Back up an HAProxy Server
Follow these steps to back up an HAProxy server.
Procedure
It is important that the following files retain their current attributes when backed up:
-
/etc/haproxy/haproxy.cfg
-
/etc/pki/rhui/*
-
/var/lib/puppet/*
-
Use the following command to back up the files:
# cp -a source_files_path destination_files_path
- In addition to the above files, you may want to back up any generated client entitlement certificates and client configuration RPMs.
17.6. Restore an HAProxy server
Procedure
Prepare a new HAProxy instance by following all steps in Chapter 8, Add an HAProxy load balancer. When those steps are completed, proceed with the following restoration steps.
ImportantIt is crucial that the files included in the restore retain their current attributes.
Use the following command to restore the files to their original locations:
# cp -a source_files_path destination_files_path