Oracle linux Download Cacher usage information

Use the OEL Download Cacher to download and cache OEl patches in air-gapped environments. This tool supports the Patches for Oracle Linux 9 sites.

The OEL Download Cacher accesses the http://yum.oracle.com to download the packages for the updates. To avoid download errors, ensure to configure your whitelist, firewall, or proxy to allow traffic through the listed hosts.

You can run the OEL Download Cacher on a Windows system or a Linux system. For information about requirements, see BigFix 10.0 - System Requirements.

The latest OEL Download Cacher is available from the BigFix Support site:

For illustration purposes, this section indicates the steps to run the OEL Download Cacher in Windows. However, the parameters and subcommands to run the OEL Download Cacher are the same for both Windows and Linux systems.

You can run the tool OELDownloadCacher.exe to perform additional operations. To run this tool from the command prompt, use the following command:
OELDownloadCacher.exe [-h] [parameters...] {subcommand} [subparameters...]

where:

-h

Specifies the help message of a command instead of running the command.

parameters
Specifies the optional parameters to be used to configure the download cacher.
--proxyServer
Specifies the URL of the proxy server to use. It must be a well-formed URL that contains a protocol and a host name. The URL is usually the IP address or DNS name of your proxy server and its port, which is separated by a colon. For example: http://192.168.100.10:8080.
--proxyUser
Specifies the proxy user name if your proxy server requires authentication.
--proxyPass
Specifies the proxy password if your proxy server requires authentication.
Only basic authentication is supported.
--download_dir
Specifies the directory where the repository metadata files are cached.
If this parameter is not defined, the files are downloaded to the directory that is relative to the download cacher executable directory.
You can configure the OEL Download Plug-in to use the cached files by setting localCache in the plugin.ini file.
--sha1_download_dir
Specifies the directory where the packages are cached with a sha1 filename into a single flat directory. The cacher downloads all packages from all repositories (keys) as files in the specified directory.
Only the packages are stored in the sha1_download_dir. Each repository metadata is stored in the download_dir, and the OEL Repository directory structure is maintained.
Space-saving benchmarks are established with the use of the --sha1_download_dir through the check-storagereq subcommand. Using --sha1_download_dir have shown significant decrease in storage size, download size, and time when caching multiple repositories of the same OEL version. This is because many packages are duplicated among repositories with the same OEL version (for example, OEL-9-x64). Space is not saved if you only cache a single repository for each OEL version (for example, OEL-9-x64).
Note: When using this parameter, consider the cache limit of the BigFix server's sha1 file folder.
--redownload
Specifies the flag to re-download and overwrite existing RPM files that are in the download directory.
If this parameter is not defined, RPM files are not re-downloaded. However, metadata are, by default, downloaded and overwritten.
--verifyExistingPkgChecksum
Specifies the flag to enforce a checksum check for existing RPM files when trying to download packages using the "buildRepo", "downloadPkg", or "downloadbypatchid" subcommands.
Note: The checksum is set to 'off' by default.
--loglevel
Specifies the log level. You can choose among DEBUG', 'INFO', 'WARNING', or 'ERROR'. By default, the value is set to 'INFO'.
INFO
Contains general information outlining the progress and successful downloads, with minimal tracing information.
WARNING
Contains information about failed downloads, and reasons for failure.
ERROR
Contains errors related to the execution of the download plug-in, which might indicate an impending fatal error.
DEBUG
Contains fine-grained information used for troubleshooting issues. This is the most verbose level available.
--help

Specifies the full description and help of a command instead of running the command.

subcommand subparameter
Specifies the subcommand and subparameters to be used to run the download cacher.
Note: The subcommand and subparameter names are case-sensitive.
The subparameter varies for each subcommand as follows:
check-baserepos
Checks if the BigFix supported OEL base repositories can be accessed. The results are displayed in the command prompt and in the <cacher directory>\logs\OELDownloadCacher.log file.
check-allrepos
Checks if the BigFix supported OEL base repositories and sub-repositories can be accessed. The results are displayed in the command prompt and in the <cacher directory>\logs\OELDownloadCacher.log file.
check-storagereq
Checks the storage space requirement when using the builRepo command with and without the --sha1_download_dir option. The results are displayed in the command prompt and in the <cacher directory>\logs\OELDownloadCacher.log file.
showKeys
Outputs the list of OS keys for the supported repositories in the <cacher directory>\logs\OELDownloadCacher.log file. An OS key indicates the OEL operating system version and architecture of a single OEL repository.
The syntax to run this subcommand is:
OELDownloadCacher.exe --download_dir <download_dir> 
[parameters] showsKeys
For example, OELDownloadCacher.exe --download_dir C:\downloads showKeys
buildRepo
Builds a local mirrored repository and downloads all the relevant files based on the specified OS key.
The syntax to run this subcommand is:
OELDownloadCacher.exe --download_dir <download_dir> 
--sha1_download_dir <sha1_download_dir> [parameters] 
buildRepo --key <OS_key1,OS_key2,…>
For example, OELDownloadCacher.exe --download_dir C:\downloads --sha1_download_dir C:\sha1_downloads buildRepo --key OEL-9-x64
where:
--key OS_key1,OS_key2,…
Specifies the OEL operating system version and architecture. Entries must be separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For example, --key OEL-9-x64.
downloadMetadataOnly
Downloads the metadata of the specified OS keys.
The syntax to run this subcommand is:
OELDownloadCacher.exe --download_dir <download_dir> 
[parameters] downloadMetadataOnly --key <OS_key1,OS_key2,…>
For example:
OELDownloadCacher.exe --download_dir C:\downloads downloadMetadataOnly 
--key oel-9-x64
where:
--key OS_key1,OS_key2,…
Specifies the OEL operating system version and architecture. Entries must be separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For example, --key OEL-9-x64.
downloadPkg
Downloads the listed RPM files for the specified OS key.
Note: If the package that you are downloading has dependencies, it is suggested that that buildrepo be used instead to avoid dependency issues
The syntax to run this subcommand is:
OELDownloadCacher.exe --download_dir <download_dir> 
[parameters] downloadPkg --key <OS_key1,OS_key2…> 
--pkg <pkg1,pkg2,…>
For example:
OELDownloadCacher.exe --download_dir C:\temp --redownload downloadPkg
--key oel-9-x64 --pkg web-assets-filesystem-5-15.el9.noarch.rpm
where:
--key OS_key1,OS_key2,…
Specifies the OEL operating system version and architecture. Entries must be separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For example, --key web-assets-filesystem-5-15.el9.noarch.rpm.
--pkg pkg1,pkg2,…
Indicates the package name.
Each entry must be separated by a comma and must not include spaces. For example, --pkg web-assets-filesystem-5-15.el9.noarch.rpm, openblas-srpm-macros-2-11.el9.noarch.rpm.
downloadByPatchId
Downloads files based on the patch ID for one or more OS keys. The OEL cacher replaces the reference to the bulletins with the patch_id. The first two digits of the patch_id typically refers to the year.
Note: If the package that you are downloading has dependencies, it is suggested that buildrepo be used instead to avoid dependency issues
The syntax to run this subcommand is:
OELDownloadCacher.exe --download_dir <download_certdir>
parameters] downloadByPatchId --key <OS_key1,OS_key2…>
--patch_id <patch_id1,patch_id2,…>
For example:
OELDownloadCacher.exe --download_dir C:\downloads downloadByPatchId
--key oel-9-x64 --patch_id 162516
where:
--key OS_key1,OS_key2,…
Specifies the OEL operating system version and architecture. Entries must be separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For example, --key oel-9-x64.
--patch_id patch_id1,patch_id2,…
Indicates the patch ID of a Fixlet, which is the first six digits in the Fixlet title.
Each entry must be separated by a comma and must not include spaces. For example, --patch_id 162516.