18.2. Restoring Red Hat Satellite from Backup


The following process describes a full Red Hat Satellite restoration. This process deletes all data from an existing Red Hat Satellite instance. During this process, ensure that:
  • You restore to the correct instance. The Red Hat Satellite instance must have the same configuration, package versions and errata as the original system.
  • All commands are executed as root in the directory where the archives were created during the backup process.
  • All SELinux contexts are correct. Run the following command to restore the correct SELinux contexts:
    restorecon -Rnv /
    
    Copy to Clipboard Toggle word wrap

Warning

The following procedure deletes all data from an existing Red Hat Satellite instance.

Procedure 18.7. To Restore a Red Hat Satellite Instance:

  1. Prepare the Red Hat Satellite host for restoration. This process restores the backup to the same server that generated the backup. If the original system is unavailable, provision the same configuration with the same settings (host name, IP address, and so on) and run katello-installer with the same options using the file from the configuration backup:
    # tar --selinux -xzvf config_files.tar.gz -C /tmp
    # katello-configure --answer-file=/etc/katello-installer/answers.katello-installer.yaml
    Copy to Clipboard Toggle word wrap
  2. Configure and change to the backup directory.
    # export BDIR=/backup
    # chgrp postgres -R $BDIR
    # cd $BDIR
    Copy to Clipboard Toggle word wrap
  3. Determine the name of the Red Hat Satellite PostgreSQL database. The default name is foreman and is specified in the /usr/share/katello-installer/modules/foreman/manifests/database/postgresql.pp file. If you chose a different name for your database, it is stored as the value of db_database in the /etc/katello-installer/answers.katello-installer.yaml file.

    Note

    If you used the default database name, this variable has no value in the answers.katello-installer.yaml file.
    The Candlepin database name, candlepin, is not currently user configurable. It is specified in the /usr/share/katello-installer/modules/candlepin/manifests/init.pp file.
  4. Stop all services prior to restoring the databases:
    # katello-service stop
    # service postgresql stop
    
    Copy to Clipboard Toggle word wrap
  5. Restore the system files. Make sure that the files extract on the correct host. Run the following commands in the backup directory to restore all system files:
    # tar --selinux -xzvf config_files.tar.gz -C /
    # tar --selinux -xzvf elastic_data.tar.gz -C /
    # tar --selinux -xvf pulp_data.tar -C /
    Copy to Clipboard Toggle word wrap
  6. Drop any existing Red Hat Satellite PostgreSQL databases:
    # service postgresql start
    # runuser - postgres -c "dropdb foreman"
    # runuser - postgres -c "dropdb candlepin"
    Copy to Clipboard Toggle word wrap

    Note

    The following error might appear during a database drop:
    database xxx is being accessed by other users
    Copy to Clipboard Toggle word wrap
    This typically means that some Satellite processes are still running. Ensure all processes are stopped.
  7. Run the following commands to restore the Red Hat Satellite PostgreSQL databases:
    # runuser - postgres -c "pg_restore -C -d postgres /backup/katello.dump"
    # runuser - postgres -c "pg_restore -C -d postgres /backup/candlepin.dump"
    Copy to Clipboard Toggle word wrap
  8. Ensure MongoDB is running and delete the old data:
    # service mongod start
    # echo 'db.dropDatabase();' | mongo pulp_database
    Copy to Clipboard Toggle word wrap
  9. Run the following command in the /backup directory to restore the MongoDB database:
    # mongorestore --host localhost mongo_dump/pulp_database/
    Copy to Clipboard Toggle word wrap
  10. Restart all Red Hat Satellite processes:
    # service postgresql start
    # katello-service start
    
    Copy to Clipboard Toggle word wrap
  11. Inspect the appropriate log files for errors, and inspect the audit.log file for AVC denials. Attempt to ping the Red Hat Satellite instance:
    # hammer -u admin -p admin ping
    Copy to Clipboard Toggle word wrap
If no errors are apparent, and you can ping the Satellite Server, the restoration should be complete and successful.
Further Reading

Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat