5.2. Restoring Satellite Server or Capsule Server from a Backup

This section describes how to restore a Red Hat Satellite Server or Red Hat Capsule Server from the backup data created as a result of following the steps in Section 5.1, “Backing up Satellite Server or Capsule Server”. This process is intended for restoring the backup on the same server that generated the backup, and all data covered by the backup will be 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).

Prerequisites

Ensure that you address the following conditions:
  • Ensure you are restoring to the correct instance. The Red Hat Satellite instance must have the same host name, configuration, and be the same major version as the original system.
  • Run the katello-restore script as root.
  • All SELinux contexts must be correct. Enter the following command to restore the correct SELinux contexts:
    # restorecon -Rnv /

Procedure 5.5. To Restore Satellite Server or Capsule Server from a Full Backup:

  1. Install Satellite 6 using the procedures in the Red Hat Satellite 6 Installation Guide[1].
  2. Copy the backup data to the Satellite's local file system. Use /tmp/ or /var/tmp/. Ensure you have enough space to store this data on the base system of Satellite Server or Capsule Server as well as enough space after the restoration to contain all the data in the /etc/ and /var/ directories contained within the backup.
    You can use the du -sh directory_name command to check the space used by a directory and the df -h directory_name command to check for free space. Add the --total option to sum the results from more than one directory.
  3. Run the restoration script:
    # katello-restore backup_directory
    Where backup_directory is the time-stamped directory or subdirectory containing the backed-up data. The target directory will be read from the configuration files contained within the archive. If the target directory does not exist when trying to recover, it will give an error and ask for the correct directory. The restore process can take a long time to complete, due to the amount of data to copy. Where incremental backups exist, see Procedure 5.6, “To Restore Satellite Server or Capsule Server from an Incremental Backup:”.
When this process completes, all services should be running and Satellite Server or Capsule Server should be available for use.

Procedure 5.6. To Restore Satellite Server or Capsule Server from an Incremental Backup:

  1. Install Satellite 6 using the procedures in the Red Hat Satellite 6 Installation Guide[2].
  2. Copy the backup data to the Satellite's local file system, for example, /var/tmp/satellite-backup/. Ensure you have enough space to store this data on the base system of Satellite Server or Capsule Server as well as enough space after the restoration to contain all the data in the /etc/ and /var/ directories contained within the backup.
  3. Run the restoration script:
    # katello-restore backup_directory_X
    Where backup_directory_X is a time-stamped directory or subdirectory containing an incremental backup. Restore the incremental backups in the same sequence that they were made. For example: backup_directory_1, backup_directory_2. The target directory will be read from the configuration files contained within the archive. If the target directory does not exist when trying to recover, it will give an error and ask for the correct directory.
When this process completes, all services should be running and Satellite Server or Capsule Server should be available for use.


[1] https://access.redhat.com/documentation/en/red-hat-satellite/6.2/single/installation-guide/
[2] https://access.redhat.com/documentation/en/red-hat-satellite/6.2/single/installation-guide/