Jump to content

GSTN - Satelite Backup And Disaster Recovery Process

From TetraWiki


SATELLITE 6.2 BACKUP AND DISASTER RECOVERY PROCESS[edit]

BACKING UP RED HAT SATELLITE SERVER[edit]

NOTE: When planning a scheduled backup, ensure that no other tasks are scheduled.


Procedure1.1 To Back up Red Hat Satellite Server:


1. This procedure performs a full off-line backup. Ensure your backup location has enough disk space to contain a copy of all of the following directories:



/etc/


/var/lib/pulp/


/var/lib/mongodb/


/var/lib/pgsql/




2. Request other Satellite Server users to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Check that no other tasks are scheduled for the same time as the backup.


3. Run the backup script:


# katello-backup backup_directory




The katello-backup script 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.This process can take a long time to complete, due to the amount of data to copy.


Procedure 1.2. To Perform an Intermediate Backup without Pulp Content:



This procedure performs an off-line backup but excludes the contents of the Pulp directory. This configuration file only backup is useful for debugging and the only intended use is to provide access to configuration files without spending time backing up the Pulp database. You cannot restore from a directory that does not contain Pulp content.




Ensure your backup location has enough disk space to contain a copy of all of the following directories:



/etc/


/var/lib/mongodb/


/var/lib/pgsql/




1. Request other Satellite Server users to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Check that no other tasks are scheduled for the same time as the backup.



2. Run the backup script:


# katello-backup --skip-pulp-content backup_directory




Procedure 1.3. To Perform an Incremental Backup:




This procedure performs an off-line backup of any changes since a previous 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/




1. Request other Satellite Server users to save any changes and warn them that for the duration of the backup, no Satellite services will be available. Check that no other tasks are scheduled for the same time as the backup.




2. Run the backup script:


# katello-backup --incremental previous_backup_directory




The katello-backup script stops all services which could impact the backup, performs the backup, then restarts the required services.


Procedure 1.4. To Perform an Online Backup:




This procedure performs a full backup but the time consuming backup of the Pulp directory is performed on-line to reduce the time Satellite services are unavailable. Configuration files and databases are backed up off-line first. Ensure your backup location has enough disk space to contain a copy of all the following directories:



/etc/


/var/lib/pulp/


/var/lib/mongodb/


/var/lib/pgsql/



1. Request other Satellite Server users to save any changes and warn them that for the initial part of the backup, no Satellite services will be available. Check that no other tasks are scheduled for the same time as the backup.




Note: While performing an on-line backup, it is important that nothing is changed in the Satellite that affects the Pulp database, such as changes to Content Views and synchronizing of repositories, or the result will be an incomplete backup of the Pulp database.






2. Run the backup script:




# katello-backup --online-backup backup_directory




The katello-backup script with the --online-backup option first stops all services which could impact the backup, backs up the configuration files and databases, restarts the required services, and then performs the more time consuming backup of the Pulp directory.



RESTORING RED HAT SATELLITE SERVER


This process restores the backup on the same server that generated the backup. If the original system is unavailable, provision the same configuration with the same settings (in particular, the host name must be the same).




Procedure 1.5. To Restore Red Hat Satellite from Backup:




1. Install Satellite 6 using the procedures in the Red Hat Satellite 6 Installation Guide




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 Satellite 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




Where backup_directory is the directory containing the backed-up data. The target directory will be read from the configuration files. If the target directory does not exist when trying to recover, it will give an error and ask for the correct directory. This process can take a long time to complete, due to the amount of data to copy.