Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 11. Recovering corrupted content


If repository or Capsule content is corrupted or metadata is inconsistent, use recovery and republish procedures to restore a consistent state.

In case of repository corruption, you can recover it by using advanced synchronization.

Procedure

  1. In the Satellite web UI, navigate to Content > Products.
  2. Select the product containing the corrupted repository.
  3. Select the name of a repository you want to synchronize.
  4. To perform optimized sync or complete sync, select Advanced Sync from the Select Action menu.
  5. Select the required option and click Sync.
  6. Optional: To verify the checksum, click Verify Content Checksum from the Select Action menu.

11.2. Recovering a corrupted repository by using Hammer CLI

In case of repository corruption, you can recover it by using advanced synchronization.

Procedure

  1. Obtain a list of repository IDs:

    $ hammer repository list \
    --organization "My_Organization"
  2. Synchronize a corrupted repository using the necessary option:

    • For the optimized synchronization:

      $ hammer repository synchronize \
      --id My_ID
    • For the complete synchronization:

      $ hammer repository synchronize \
      --id My_ID \
      --skip-metadata-check true
    • For the validate content synchronization:

      $ hammer repository synchronize \
      --id My_ID \
      --validate-contents true

If hosts can no longer consume content from Capsule Servers, the content has been corrupted and needs to be repaired. Depending on the amount of content on your Capsule Server, this task might take some time.

Procedure

  1. In the Satellite web UI, navigate to Infrastructure > Capsules.
  2. Select your Capsule Server.
  3. Recover corrupted content on your Capsule Server.

    • To repair content in a lifecycle environment, select the ellipsis next to your lifecycle environment and click Verify Content Checksum.
    • To repair content in a content view, select the ellipsis next to your content view and click Verify Content Checksum.

Verification

  1. In the Satellite web UI, navigate to Monitor > Satellite Tasks > Tasks.
  2. Search for Verify checksum for content.
  3. Verify that the task completed successfully.

If hosts can no longer consume content from Capsule Servers, the content has been corrupted and needs to be repaired. Depending on the amount of content on your Capsule Server, this task might take some time.

Procedure

  1. Display a list of all Capsules:

    $ hammer capsule list

    Note the ID of your Capsule Server.

  2. Recover corrupted content on your Capsule Server:

    • Repair content in a content view:

      $ hammer capsule content verify-checksum \
      --content-view-id My_Content_View_ID \
      --id My_Capsule_Server_ID \
      --organization-id My_Organization_ID
    • Repair content in a lifecycle environment:

      $ hammer capsule content verify-checksum \
      --id My_Capsule_Server_ID \
      --lifecycle-environment-id My_Lifecycle_Environment_ID \
      --organization-id My_Organization_ID
    • Repair content in a repository:

      $ hammer capsule content verify-checksum \
      --id My_Capsule_Server_ID \
      --organization-id My_Organization_ID \
      --repository-id My_Repository_ID
    • Repair all content on your Capsule Server:

      $ hammer capsule content verify-checksum \
      --id My_Capsule_Server_ID

Verification

  • Verify that the task completed successfully:

    $ hammer task list --search "Verify checksum for content"

You can republish repository metadata when a repository distribution does not have the content that should be distributed based on the contents of the repository.

Use this procedure with caution. Red Hat recommends a complete repository sync or publishing a new content view version to repair broken metadata.

Procedure

  1. In the Satellite web UI, navigate to Content > Products.
  2. Select the product that includes the repository for which you want to republish metadata.
  3. On the Repositories tab, select a repository.
  4. To republish metadata for the repository, click Republish Repository Metadata from the Select Action menu.

    Note

    This action is not available for repositories that use the Complete Mirroring policy because the metadata is copied verbatim from the upstream source of the repository.

11.6. Republishing repository metadata by using CLI

You can republish repository metadata when a repository distribution does not have the content that should be distributed based on the contents of the repository.

Use this procedure with caution. Red Hat recommends a complete repository sync or publishing a new content view version to repair broken metadata.

Prerequisites

  • Ensure that the mirroring policy of your repository is not set to Complete Mirroring:

    $ hammer repository info \
    --fields "Name,Mirroring policy" \
    --name "My_Repository_Name" \
    --organization-id My_Organization_ID \
    --product "My_Product_Name"

Procedure

  • Republish metadata for your repository:

    $ hammer repository verify-checksum \
    --name "My_Repository_Name" \
    --organization-id My_Organization_ID \
    --product "My_Product_Name"

Verification

  • Verify that the task completed successfully:

    $ hammer task list --search "Metadata generate repository"

Republish metadata of content view versions if hosts report package checksum mismatches. You can use Satellite web UI to republish content view metadata.

Republishing repository metadata will regenerate metadata for all repositories in the content view version that do not adhere to the Complete Mirroring policy.

Procedure

  1. In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
  2. Select a content view.
  3. On the Versions tab, select a content view version.
  4. To republish metadata for the content view version, click Republish repository metadata from the vertical ellipsis icon.

11.8. Republishing content view metadata by using CLI

Republish metadata of content view versions if hosts report package checksum mismatches. You can use Hammer CLI to republish metadata of content view versions.

Procedure

  • Republish metadata for your content view version:

    $ hammer content-view version verify-checksum --id My_Content_View_Version_ID

Verification

  • Verify that the task completed successfully:

    $ hammer task list --search "Verify checksum of repositories in"
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de la documentation Red Hat

Legal Notice

Theme

© 2026 Red Hat
Retour au début