Chapter 19. 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.

19.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.

  1. The /var/lib/pulp directory may be large, depending on how many repositories have been deployed on the Red Hat Update Appliance. See Section 1.4.3 Storage in the Red Hat Satellite 6.1 Installation Guide for specific storage requirements. or use the du command from the command-line interface to determine its size.
  2. Stop the pulp-server services.

    1. For RHEL 6:

      # service pulp_workers stop; service pulp_resource_manager stop; service pulp_celerybeat stop
    2. For RHEL 7:

      # systemctl stop pulp_workers; systemctl stop pulp_resource_manager; systemctl stop pulp_celerybeat
  3. Replace stop with status in the above commands to verify each service has stopped.
  4. 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/*

      Use the following command to back up the files.

      # cp -a source_files_path destination_files_path
  5. You may want to back up any generated client entitlement certificates and client configuration RPMs.
  6. Restart the pulp-server services.

    1. For RHEL 6:

      # service pulp_workers start; service pulp_resource_manager start; service pulp_celerybeat start
    2. For RHEL 7:

      # systemctl start pulp_workers; systemctl start pulp_resource_manager; systemctl start pulp_celerybeat
  7. Replace start with status in the above commands to verify each service has started.

19.2. Restore the Red Hat Update Appliance

  1. 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”. Once those steps are completed, proceed with the following restoration steps.
  2. Stop the pulp-server services.

    1. For RHEL 6:

      # service pulp_workers stop; service pulp_resource_manager stop; service pulp_celerybeat stop
    2. For RHEL 7:

      # systemctl stop pulp_workers; systemctl stop pulp_resource_manager; systemctl stop pulp_celerybeat
  3. Replace stop with status in the above commands to verify each service has stopped.

    Important

    It is crucial that the files included in the restore retain their current attributes.

  4. Use the following command to restore the files to their original locations.

    # cp -a source_files_path destination_files_path
  5. Restart the pulp-server services.

    1. For RHEL 6:

      # service pulp_workers start; service pulp_resource_manager start; service pulp_celerybeat start
    2. For RHEL 7:

      # systemctl start pulp_workers; systemctl start pulp_resource_manager; systemctl start pulp_celerybeat
  6. Replace start with status in the above commands to verify each service has started.

19.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.

  1. The /var/lib/pulp directory may be large, depending on how many repositories have been deployed on the Red Hat Update Appliance. See Section 1.4.3 Storage in the Red Hat Satellite 6.1 Installation Guide for specific storage requirements. or use the du command from the command-line interface to determine its size.
  2. Stop the httpd service.

    1. For RHEL 6:

      # service httpd stop
    2. For RHEL 7:

      # systemctl stop httpd
  3. Replace stop with status in the above commands to verify each service has stopped.
  4. 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/*

      Use the following command to back up the files.

      # cp -a source_files_path destination_files_path
  5. In addition to the above files, you may want to back up any generated client entitlement certificates and client configuration RPMs.
  6. Restart the service.

    1. For RHEL 6:

      # service httpd start
    2. For RHEL 7:

      # systemctl start httpd
  7. Replace start with status in the above commands to verify each service has started.

19.4. Restore a Content Delivery Server

  1. Prepare a new CDS instance by following all steps in Chapter 8, Add a Content Delivery Server. Once those steps are completed, proceed with the following restoration steps.
  2. Stop the httpd service.

    1. For RHEL 6:

      # service httpd stop
    2. For RHEL 7:

      # systemctl stop httpd
  3. Replace stop with status in the above commands to verify each service has stopped.

    Important

    It is crucial that the files included in the restore retain their current attributes.

  4. Use the following command to restore the files to their original locations.

    # cp -a source_files_path destination_files_path
  5. Restart the httpd service.

    1. For RHEL 6:

      # service httpd start
    2. For RHEL 7:

      # systemctl start httpd
  6. Replace start with status in the above commands to verify each service has started.

19.5. Back up an HAProxy Server

Follow these steps to back up an HAProxy server.

  1. It is important that the following files retain their current attributes when backed up.

    • /etc/haproxy/haproxy.cfg
    • /etc/pki/rhui/*
  2. Use the following command to back up the files.

    # cp -a source_files_path destination_files_path
  3. In addition to the above files, you may wish to back up any generated client entitlement certificates and client configuration RPMs.

19.6. Restore an HAProxy Server

  1. Prepare a new HAProxy instance by following all steps in Chapter 9, Add an HAProxy Load Balancer. Once those steps are completed, proceed with the following restoration steps.

    Important

    It is crucial that the files included in the restore retain their current attributes.

  2. Use the following command to restore the files to their original locations.

    # cp -a source_files_path destination_files_path

Report a bug