Installation guide

5. Create a target directory for the files, such as:
mkdir /var/rhn-sat-import/
6. This sample command assumes the administrator wants to copy the contents of the ISO (mounted
in /mnt/im port/) into /var/rhn-sat-im port/:
cp -ruv /mnt/import/* /var/rhn-sat-import/
7. Then unmount /m nt/im port in preparation for the next CD or ISO:
um ount /mnt/import
8. Repeat these steps for each Channel Content ISO of every channel to be imported.
6.2.2.2 . Preparing RHN Sa te llite Exporter Da ta
In order to perform the import from data previously exported us ing RHN Satellite Exporter, you must first
copy that data onto the local system. Steps such as the following will enable you to procede to running
the import as described in Section 6.2.3,Running the Import”.
1. Log into the machine as root.
2. Create a target directory for the files, such as:
mkdir /var/rhn-sat-import/
3. Make the export data available on the local machine in the directory created in the previous s tep.
This can be done by copying the data directly, or by mounting the data from another machine
using NFS. It is perhaps easiest to copy the data into the new directory with a command such as
the following:
scp -r root@ storage.example.com :/var/sat-backup/* /var/rhn-sat-import
Now that the data is available, you can procede to performing the import.
6.2.3. Running the Import
The spacewalk-backend-tools package provides the satellite-sync program for managing all
package, channel, and errata imports and synchronizations.
The following process assumes in the previous step the user has copied all data to /var/rhn-sat-
import.
The first s tep in importing channels into the databas e is listing the channels available for import. This is
accomplished with the command:
satellite-sync --list-channels --m ount-point /var/rhn-sat-import
The next step is to initiate the import of a s pecific channel. Do this using a channel label presented in
the previous list. T he command will look like:
satellite-sync -c rhel-i386-as-3 --mount-point /var/rhn-sat-import
Note
Importing package data can take up to two hours per channel. You may begin registering systems
to channels as soon as they appear in the RHN Satellite's website. No packages are necessary
for registration, although updates cannot be retrieved from the Satellite until the channel is
completely populated.
You may repeat this step for each channel or include them all within a single command by passing each
channel label preceded by an additional -c flag, like so:
satellite-sync -c channel-label-1 \
-c channel-label-2 \
--m ount-point /var/rhn-sat-import
This conducts the following tasks in this order:
1. Populating the tables describing common features for channels (channel families). T his can also
be accomplished individually by passing the --step=channel-families option to satellite-
sync.
2. Creating a particular channel in the database and importing the metadata describing the channel.
Individually, use the --step=channels option.
3. Moving the RPM packages from the temporary repository into their final location. Individually, use
the --step=rpms option.
4. Parsing the header metadata for each package in the channel, uploading the package data, and
ass ociating it with the channel. Individually, use the --step=packages option.
5. Identifying Errata associated with the packages and including them in the repository. Individually,
use the --step=errata option.
After running the preceding sample command, the population of the channel should be complete. All of
the packages s hould have been moved out of the repository; this can be verified with the command cd
/var/rhn-sat-im port/; ls -alR | grep rpm . If all RPMs have been installed and moved to
their permanent locations, then this count will be zero, and the administrator may safely remove the
temporary repository (in this case, /var/rhn-sat-im port/).
6.3. Synchronizing
An update channel is only as useful as the freshnes s of the information in that channel. Since the RHN
Satellite is designed to be a standalone environment, any update advisories published by RHN must be
manually imported and synchronized by the administrator of the RHN Satellite.
During synchronization over the Internet, the RHN Sat ellit e Synchroniza tion T ool performs the
following steps:
1. Connects over SSL to central RHN Servers, authenticates itself as an RHN Satellite, and triggers
an export of RHN dataunless a local mount point for RHN-exported data is specified, in which
case no connection is necessary. Refer to Section 6.3.2, “Synchronizing Errata and Packages via
Local Media” for an explanation.
2. Examines the export and identifies differences between the RHN Satellite data set and the
exported RHN data set. For a particular channel, the following information is analyzed:
Chapter 6. Importing and Synchronizing
25