Chapter 3. Planning for Disaster Recovery

This chapter describes the recommended methods for backing up, verifying, and restoring Red Hat Satellite and embedded databases. If you are using an external database, consult your organization's database administrator. If you are using an embedded database, see Section 3.2, “Backing up an Embedded Database” for a complete description of this process and the options available.
You should create backups either nightly or weekly, depending on the amount of data being stored, and how much data can potentially be lost in the case of a system outage.
If you plan on performing offline, or "cold", backups, Red Hat recommends that you schedule these backups to occur during scheduled Satellite Server maintenance outages, because all website and client connection services will be unavailable during the backup. Satellite 5.6 and later include online, or "hot", backup functionality; it is not necessary to perform offline backups.

3.1. Backing up a Red Hat Satellite Server

Several methods exist for backing up your Red Hat Satellite system. The following methods are those recommended by Red Hat.
Minimal Backup

Red Hat recommends that you back up at least the following files and directories:

  • /opt/rh/postgresql92/root/var/lib/pgsql/ (Embedded database only)
  • /etc/sysconfig/rhn/
  • /etc/rhn/
  • /etc/sudoers
  • /var/www/html/pub/
  • /var/satellite/redhat/[0-9]*/ (This is the location of any custom RPMs)
  • /root/.gnupg/
  • /root/ssl-build/
  • /etc/dhcp.conf
  • /etc/httpd
  • /var/lib/tftpboot/ (In Red Hat Enterprise Linux 6)
  • /var/lib/cobbler/
  • /var/lib/rhn/kickstarts/
  • /var/www/
  • /var/lib/nocpulse/
  • /etc/tomcat*/
  • /etc/jabberd/
  • /etc/cobbler/
If possible, back up /var/satellite/ as well. In case of failure, this will save lengthy download times. The /var/satellite/ directory (specifically /var/satellite/redhat/NULL/) is primarily a duplicate of Red Hat's RPM repository, and can be regenerated using the satellite-sync command. Red Hat recommends that the entire /var/satellite/ tree be backed up. In the case of disconnected satellites, /var/satellite/ must be backed up.
Backing up only these files and directories does have some drawbacks. As part of the failure recovery process, you need to:
  • Reinstall the Red Hat Satellite ISO RPMs.
  • Reregister the server.
  • Use the satellite-sync command to resynchronize Red Hat packages.
  • Reinstall the /root/ssl-build/rhn-org-httpd-ssl-key-pair-MACHINE_NAME-VER-REL.noarch.rpm file.
Backup without Reregistration

Another method is to back up all of the files and directories mentioned above but reinstall the Satellite server without reregistering it. During the installation, cancel or skip the Red Hat Network registration and SSL certificate generation sections.

Full Machine Backup

The final and most comprehensive method is to back up the entire machine. This saves download and reinstallation time but requires additional disk space and back-up time.

Important

Regardless of the back-up method used, when you restore the Satellite server from a backup, you must run the following command to schedule the recreation of search indexes the next time the rhn-search service is started:
# service rhn-search cleanindex