Chapter 5. Backup and Disaster Recovery
5.1. Backing up Satellite Server or Capsule Server
katello-backup script. Backing up to a separate location is recommended. Backing up to a separate storage device on a separate system is highly recommended. As no Satellite services will be available during the backup, the backup can be scheduled for a quiet time (for example, using cron).
Note
- When planning a scheduled backup, ensure that no other tasks are scheduled by other administrators for the same time. This is particularly important when administrators are working in different locations and time zones.
- When creating a snapshot or conventional backup, stop all services (Do not do this if using the
katello-backupscript):#
katello-service stopStart the services after creating a snapshot or conventional backup:#
katello-service start
katello-backup script to make and restore backups. To see the usage statement, enter a command as follows:
# katello-backup --help
katello-backup creates a time-stamped subdirectory in the backup directory you specify. The katello-backup script does not overwrite backups and the correct directory or subdirectory has to be selected when restoring from a backup or an incremental backup. The script will stop and restart services as required.
Known Issues
katello-backup script has the following known issues:
- In Satellite 6.2.7 and earlier:
- The script does not support using the same directory multiple times for a full backup. Update to Satellite 6.2.8 or newer if possible. Alternatively, use a new directory every time or move the previous backup to a safe location until the new backup has completed successfully.
- If an existing directory is used as the backup target directory, the script will change the group to the
postgresgroup. This can have unexpected consequences if other processes are also using the directory. Update to Satellite 6.2.8 or newer if possible. Alternatively, use a new directory or subdirectory exclusively for backups.
- In Satellite 6.2.8 and earlier, using the
--online-backupoption leaves Satellite services down. Update to Satellite 6.2.9 or newer if possible. Additionally, until Red Hat Bug 1432013 is resolved, use only the/tmp/or/var/tmp/directory to create online backups. - In Satellite 6.2.9 and earlier, using the
--incrementaloption created full backups. This was fixed in Red Hat Bug 1445989 included in the asynchronous erratum RHBA-2017:1234 - Bug Fix Advisory. On Satellite 6.2.9, apply the erratum or upgrade to a newer version if possible.
Checking the Satellite or Capsule Version
# yum info satellite
Procedure 5.1. To Perform a Full Backup of Satellite Server or Capsule Server:
- Ensure your backup location has enough disk space to contain a copy of the following directories:
/etc//var/lib/pulp//var/lib/mongodb//var/lib/pgsql/
In Satellite 6.2.7 and earlier, the backup target directory must be a new directory or subdirectory created exclusively for backups. You can use thedu -sh directory_namecommand to check the space used by a directory. - Request other users of Satellite Server or Capsule Server to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Ensure that no other tasks are scheduled for the same time as the backup.
- Run the backup script:
#
katello-backup backup_directoryThekatello-backupscript stops all services which could impact the backup, performs the backup, then restarts the required services. If the target directory does not exist when trying to create a backup file the script will create it.Note
From Satellite 6.2.13 thekatello-backupscript prompts for confirmation that the backup is to proceed. To run the backup without being prompted, add parameter--assumeyes.This process can take a long time to complete, due to the amount of data to copy.
Procedure 5.2. To Perform a Backup without Pulp Content:
- Ensure your backup location has enough disk space to contain a copy of the following directories:
/etc//var/lib/mongodb//var/lib/pgsql/
You can use thedu -sh directory_namecommand to check the space used by a directory. - Request other users of Satellite Server or Capsule Server to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Ensure that no other tasks are scheduled for the same time as the backup.
- Run the backup script:
#
katello-backup --skip-pulp-content backup_directoryThekatello-backupscript stops all services which could impact the backup, performs the backup, then restarts the required services. If the target directory does not exist when trying to create a backup file the script will create it.Note
From Satellite 6.2.13 thekatello-backupscript prompts for confirmation that the backup is to proceed. To run the backup without being prompted, add parameter--assumeyes.
Procedure 5.3. To Perform an Incremental Backup:
- Ensure your backup location has enough disk space to contain a copy of all changes in the following directories:
/etc//var/lib/pulp//var/lib/mongodb//var/lib/pgsql/
You can use thedu -sh directory_namecommand to check the space used by a directory. - Request other users of Satellite Server or Capsule Server to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Ensure that no other tasks are scheduled for the same time as the backup.
- Run the backup script:With Pulp content:
#
katello-backup backup_directory --incremental backup_directory/previous_time-stamped_subdirectoryWithout Pulp content:#
katello-backup backup_directory --skip-pulp-content --incremental backup_directory/previous_time-stamped_subdirectoryThekatello-backupscript stops all services which could impact the backup, performs the backup, then restarts the required services. If the target directory does not exist when trying to create a backup file the script will create it. It is possible to make incremental backups using a backup older than the previous backup as a starting point, but with a corresponding increase in time to make the backup.Note
From Satellite 6.2.13 thekatello-backupscript prompts for confirmation that the backup is to proceed. To run the backup without being prompted, add parameter--assumeyes.
Procedure 5.4. To Perform an Online Backup:
Note
/tmp/ or /var/tmp/ directory to create online backups.
Important
--online-backup option keeps all services running which means there is a possibility that data can be modified while the backup is being made. There is a basic check to see if the databases were modified during the backup. If this occurs, the script starts the database portion of the backup again. This check is rudimentary and cannot ensure with 100% certainty that there were no modifications to the databases while the backup script was running. This check can also result in repeated loops if there is continuous modification occurring to the databases.
--online-backup method in production, ensure that no modifications occur during the backup.
- Ensure you have updated to Satellite 6.2.9 or later. To check the version of Satellite 6, use a command as follows:
#
yum info satellite - Ensure your backup location has enough disk space to contain a copy of the following directories:
/etc//var/lib/pulp//var/lib/mongodb//var/lib/pgsql/
You can use thedu -sh directory_namecommand to check the space used by a directory. - Request other users of Satellite Server or Capsule Server to save any changes and ask them not to make changes to repositories and Content Views for the duration of the backup. Ensure that no other tasks, such as synchronizing of repositories, are scheduled for the same time as the backup.
- Run the backup script:
#
katello-backup --online-backup /tmp/backup_directoryNote
From Satellite 6.2.13 thekatello-backupscript prompts for confirmation that the backup is to proceed. To run the backup without being prompted, add parameter--assumeyes.
Example 5.1. A Weekly Full Backup Followed by Daily Incremental Backups
#!/bin/bash -e DESTINATION=/var/backup if [[ $(date +%w) == 0 ]]; then katello-backup $DESTINATION --assumeyes else LAST=$(ls -td -- $DESTINATION/*/ | head -n 1) katello-backup $DESTINATION --incremental "$LAST" --assumeyes fi exit 0
--assumeyes parameter only if your Satellite version is 6.2.13 and higher.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.