Red Hat Training

A Red Hat training course is available for Red Hat Satellite

6.2. Importing with RHN Satellite Synchronization Tool

Before distributing packages via RHN Satellite, the packages must first be uploaded to the Satellite. This section describes the process for importing packages and other channel data.

Important

To populate custom channels correctly, you must first populate at least one Red Hat base channel. The RHN Satellite Synchronization Tool creates the necessary directory structures and permissions; without these, the custom channel tools will not work properly. For this reason, you should use these instructions to set up your base channel(s) and then refer to the RHN Channel Management Guide for steps to establish custom channels.

6.2.1. satellite-sync

The RHN Satellite Synchronization Tool (satellite-sync) enables an RHN Satellite to update its database metadata and RPM packages with those of RHN's central servers, another Satellite within your organization, or local media.

Important

Running satellite-sync can import a large amount of data, especially on newly installed Satellite servers. If your database has performance issues after a significant amount of data changes, consider gathering statistics on the database. Refer to Section 8.4, “Using RHN DB Control for more information.
To launch the RHN Satellite Synchronization Tool, execute the following command as root:
satellite-sync

This tool can be used in a closed environment, such as the one created with a disconnected install, or it may obtain data directly over the Internet. Closed environment imports can get their data from downloaded ISOs or from the XML data generated by RHN Satellite Exporter.
The RHN Satellite Synchronization Tool works incrementally, or in steps. For it to obtain Errata information, it must first know the packages contained. For the packages to be updated, the tool must first identify the associated channel(s). For this reason, the RHN Satellite Synchronization Tool performs its actions in the following order:
  1. channel-families — Import/synchronize channel family (architecture) data.
  2. channels — Import/synchronize channel data.
  3. rpms — Import/synchronize RPMs.
  4. packages — Import/synchronize full package data for those RPMs retrieved successfully.
  5. errata — Import/synchronize Errata information.
Each of these steps can be initiated individually for testing purposes with the effect of forcing the tool to stop when that step is complete. All steps that precede it, however, will have taken place. Therefore, calling the rpms step will automatically ensure the channels and channel-families steps take place first. To initiate an individual step, use the --step option, like so:
satellite-sync --step=rpms
In addition to --step, the RHN Satellite Synchronization Tool offers many other command line options. To use them, insert the option and the appropriate value after the satellite-sync command when launching import/synchronization.

Table 6.2. Satellite Import/Sync Options

Option Description
-h, --help Display this list of options and exit.
-d=, --db=DB Include alternate database connect string: username/password@SID.
-m=, --mount-point=MOUNT_POINT Import/sync from local media mounted to the Satellite. To be used in closed environments (such as those created during disconnected installs).
--list-channels List all available channels and exit.
-c=, --channel=CHANNEL_LABEL Process data for this channel only. Multiple channels can be included by repeating the option. If no channels are specified, all channels on the Satellite will be freshened.
-p, --print-configuration Print the current configuration and exit.
--no-ssl Not Advisable - Turn off SSL.
--step=STEP_NAME Perform the sync process only to the step specified. Typically used in testing.
--no-rpms Do not retrieve actual RPMs.
--no-packages Do not process full package data.
--no-errata Do not process Errata information.
--no-kickstarts Do not process kickstart data (provisioning only).
--force-all-packages Forcibly process all package data without conducting a diff.
--debug-level=LEVEL_NUMBER Override the amount of messaging sent to log files and generated on the screen set in /etc/rhn/rhn.conf, 0-6 (2 is default).
--email Email a report of what was imported/synchronized to the designated recipient of traceback email.
--traceback-mail=TRACEBACK_MAIL Direct sync output (from --email) to this email address.
-s=, --server=SERVER Include the hostname of an alternative server to connect to for synchronization.
--http-proxy=HTTP_PROXY Add an alternative HTTP proxy server in the form hostname:port.
--http-proxy-username=PROXY_USERNAME Include the username for the alternative HTTP proxy server.
--http-proxy-password=PROXY_PASSWORD Include the password for the alternative HTTP proxy server.
--ca-cert=CA_CERT Use an alternative SSL CA certificate by including the full path and filename.
--systemid=SYSTEM_ID For debugging only - Include path to alternative digital system ID.
--batch-size=BATCH_SIZE For debugging only - Set maximum batch size in percent for XML/database-import processing. Open man satellite-sync for more information.
If no options are included, satellite-sync synchronizes all channels that already exist in the Satellite's database. By default, the --step (all steps) option is enabled.
Keep in mind that the --channel option requires the channel label, not its name. For instance, use "rhel-i386-as-3" not "Red Hat Enterprise Linux 3 i386." Use the --list-channels option to obtain a list of all channels by label. All displayed channels are available for importing and synchronizing.