5.9. Recovering a Repository
In the case of repository corruption, you can recover it by using an advanced synchronization, which has three options:
- Optimized Sync
- Synchronizes the repository bypassing RPMs that have no detected differences from the upstream RPMs.
- Complete Sync
- Synchronizes all RPMs regardless of detected changes. Use this option if specific RPMs could not be downloaded to the local repository even though they exist in the upstream repository.
- Validate Content Sync
Synchronizes all RPMs and then verifies the checksum of all RPMs locally. If the checksum of an RPM differs from the upstream, it re-downloads the RPM. This option is relevant only for
yum
repositories. Use this option if you have one of the following errors:-
Specific RPMs cause a
404
error while synchronizing withyum
. -
Package does not match intended download
error, which means that specific RPMs are corrupted.
-
Specific RPMs cause a
Procedure
To synchronize a specific repository with an advanced option, complete the following steps:
- In the Satellite web UI, navigate to Content > Products.
- Select the product containing the corrupted repository.
- Select the name of a repository you want to synchronize.
- From the Select Action menu, select Advanced Sync.
- Select the option and click Sync.
For CLI users
Obtain a list of repository IDs:
# hammer repository list --organization "My_Organization"
Synchronize a corrupted repository using the necessary option:
For the optimized synchronization:
# hammer repository synchronize --incremental true --id 1
For the complete synchronization:
# hammer repository synchronize --skip-metadata-check true --id 1
For the validate content synchronization:
# hammer repository synchronize --validate-contents true --id 1